-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Black should never try to format symlinks #3880
Copy link
Copy link
Open
Labels
T: enhancementNew feature or requestNew feature or request
Description
After upgrading to 23.9.1, due to #3846 I ran into the following situation:
a/file.pyis a symlink tob/file.pyb/file.pyis not formatted because it's inexclude
Previously, Black ignored the file. Now it wants to format it.
I would expect Black to not format these files. The actual files are excluded, the symlinks aren't themselves Python files. I think this can be implemented with a simple rule: never follow symlinks. If the file is in a place that Black should format, we'll find it through its resolved path. If it's not, we shouldn't format it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
T: enhancementNew feature or requestNew feature or request