Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use removeprefix and removesuffix string methods #2911

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

johannaengland
Copy link
Contributor

Dependent on #2901.

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.

Copy link

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 60.19%. Comparing base (35f1a9b) to head (93088aa).
Report is 6 commits behind head on master.

Files Patch % Lines
python/nav/web/geomap/db.py 0.00% 2 Missing ⚠️
python/nav/bin/navmain.py 0.00% 1 Missing ⚠️
python/nav/ipdevpoll/plugins/dot1q.py 0.00% 1 Missing ⚠️
python/nav/statemon/checker/FtpChecker.py 0.00% 1 Missing ⚠️
python/nav/statemon/checker/MysqlChecker.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2911      +/-   ##
==========================================
- Coverage   60.20%   60.19%   -0.02%     
==========================================
  Files         601      601              
  Lines       43981    43969      -12     
==========================================
- Hits        26480    26468      -12     
  Misses      17501    17501              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Test results

       9 files         9 suites   7m 46s ⏱️
3 320 tests 3 320 ✔️ 0 💤 0
6 379 runs  6 379 ✔️ 0 💤 0

Results for commit 93088aa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant