Skip to content

Rstrip used to remove suffix substrings

Herman Groot requested to merge rstrip-used-to-remove-suffix-substrings into master

As I was familiarizing myself with the Rapthor pipeline, I found two places where .rstrip() was being used to remove a trailing substring. In those situations, .removesuffix() are best used instead. rstrip will otherwise remove any trailing character. E.g. msout = 'some_file_with_bad_modeldata'.rstrip('_modeldata') will result in msout = 'some_file_with_b'.

I bundled the fix for this with some minor typos and textual changes I found which I think are worth including.

Merge request reports

Loading