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

Current item path should be normalized before comparing against excluded/included paths regex #69

Open
noexec opened this issue Apr 21, 2023 · 0 comments

Comments

@noexec
Copy link

noexec commented Apr 21, 2023

The plugin uses re.search() with excluded/included paths configuration extracted from pyproject.toml settings.
However, Black docs specify that:

  1. Forward slashes are used on all platforms, including Windows (ref)
  2. ^/ should match the beginning of path (ref)

This implies that before deciding on inclusion and exclusion, collected file paths should be normalized to / directory separators, and should begin with / as well. E.g., /src/package/file.py.

At present, an excluded path like /src/package/file.py or /file.py fails to exclude it on Windows platform.

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

No branches or pull requests

1 participant