mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
Add more ruff rules (#8767)
* Add more ruff rules * Add more ruff rules * pre-commit: Update ruff v0.0.269 -> v0.0.270 * Apply suggestions from code review * Fix doctest * Fix doctest (ignore whitespace) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -33,7 +33,7 @@ def print_directory_md(top_dir: str = ".") -> None:
|
||||
if filepath != old_path:
|
||||
old_path = print_path(old_path, filepath)
|
||||
indent = (filepath.count(os.sep) + 1) if filepath else 0
|
||||
url = "/".join((filepath, filename)).replace(" ", "%20")
|
||||
url = f"{filepath}/{filename}".replace(" ", "%20")
|
||||
filename = os.path.splitext(filename.replace("_", " ").title())[0]
|
||||
print(f"{md_prefix(indent)} [{filename}]({url})")
|
||||
|
||||
|
Reference in New Issue
Block a user