Skip to content

Commit

Permalink
style: Apply ruff/refurb rule FURB188
Browse files Browse the repository at this point in the history
FURB188 Prefer `str.removeprefix()` over conditionally replacing with slice.
  • Loading branch information
DimitriPapadopoulos authored Mar 6, 2025
1 parent 2f87db8 commit d8f1d7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yamllint/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def run(argv=None):
max_level = 0

for file in find_files_recursively(args.files, conf):
filepath = file[2:] if file.startswith('./') else file
filepath = file.removeprefix('./')
try:
with open(file, newline='') as f:
problems = linter.run(f, conf, filepath)
Expand Down

0 comments on commit d8f1d7c

Please sign in to comment.