Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
Don't clobber result of best_effort_relative_path.
Some how this was missed during but we had:
     root_relative_path = best_effort_relative_path(path, root).as_posix()
            root_relative_path = "/" + root_relative_path

Obviously not what was intended in PR #4222
  • Loading branch information
reporter123 committed Feb 19, 2024
1 parent d1d4fc5 commit fd0695c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/black/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,6 @@ def get_sources(
continue

root_relative_path = best_effort_relative_path(path, root).as_posix()
root_relative_path = "/" + root_relative_path

# Hard-exclude any files that matches the `--force-exclude` regex.
if path_is_excluded(root_relative_path, force_exclude):
report.path_ignored(
Expand Down

0 comments on commit fd0695c

Please sign in to comment.