mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
Make some ruff fixes (#8154)
* Make some ruff fixes * Undo manual fix * Undo manual fix * Updates from ruff=0.0.251
This commit is contained in:
@ -21,9 +21,8 @@ def md_prefix(i):
|
||||
def print_path(old_path: str, new_path: str) -> str:
|
||||
old_parts = old_path.split(os.sep)
|
||||
for i, new_part in enumerate(new_path.split(os.sep)):
|
||||
if i + 1 > len(old_parts) or old_parts[i] != new_part:
|
||||
if new_part:
|
||||
print(f"{md_prefix(i)} {new_part.replace('_', ' ').title()}")
|
||||
if (i + 1 > len(old_parts) or old_parts[i] != new_part) and new_part:
|
||||
print(f"{md_prefix(i)} {new_part.replace('_', ' ').title()}")
|
||||
return new_path
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user