Uninett / nav

Network Administration Visualized
GNU General Public License v3.0
181 stars 38 forks source link

Use removeprefix and removesuffix string methods #2911

Closed johannaengland closed 1 month ago

johannaengland commented 4 months ago

These methods have been added to Python 3.9: https://peps.python.org/pep-0616/

They remove the prefix/suffix if it exists and do nothing to the string if not.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 56.35%. Comparing base (0a90566) to head (a917a22).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2911 +/- ## ========================================== - Coverage 56.35% 56.35% -0.01% ========================================== Files 603 603 Lines 43862 43850 -12 Branches 48 48 ========================================== - Hits 24719 24712 -7 + Misses 19131 19126 -5 Partials 12 12 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 4 months ago

Test results

       9 files         9 suites   7m 46s :stopwatch: 3 320 tests 3 320 :heavy_check_mark: 0 :zzz: 0 :x: 6 379 runs  6 379 :heavy_check_mark: 0 :zzz: 0 :x:

Results for commit 93088aab.