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

Ignore __pypackages__ directory contents #2834

Closed
cachitas opened this issue Jan 30, 2022 · 3 comments · Fixed by #2836
Closed

Ignore __pypackages__ directory contents #2834

cachitas opened this issue Jan 30, 2022 · 3 comments · Fixed by #2836
Labels
C: file collection Related to file collection (e.g. gitignore & cache) or file discovery and all of its configuration. S: accepted The changes in this design / enhancement issue have been accepted and can be implemented T: enhancement New feature or request

Comments

@cachitas
Copy link

Describe the bug

When using PDM, black does not ignore __pypackages__ directory contents.

To Reproduce

Run pdm run black .

Expected behavior

black should reformat only project files.

Environment

  • Black's version: 22.1.0
  • PDM version: 1.12.6
  • OS and Python version: Ubuntu 21.10 with Python 3.10.1
@cachitas cachitas added the T: bug Something isn't working label Jan 30, 2022
JelleZijlstra added a commit that referenced this issue Jan 30, 2022
@felix-hilden felix-hilden added T: enhancement New feature or request and removed T: bug Something isn't working labels Jan 30, 2022
@felix-hilden
Copy link
Collaborator

Since we already ignore venvs and a bunch of other stuff by default, I think this is a reasonable ask.

@cachitas
Copy link
Author

Just noticed this is partly my fault.
I had the directory in my .gitignore but was using exclude in my [tool.black] section in pyproject.toml. Using extend-exclude as documented fixed it.

@JelleZijlstra
Copy link
Collaborator

Then my proposed fix wouldn't have helped you either :). But it's still a reasonable idea to exclude the directory by default.

@ichard26 ichard26 added C: file collection Related to file collection (e.g. gitignore & cache) or file discovery and all of its configuration. S: accepted The changes in this design / enhancement issue have been accepted and can be implemented labels Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: file collection Related to file collection (e.g. gitignore & cache) or file discovery and all of its configuration. S: accepted The changes in this design / enhancement issue have been accepted and can be implemented T: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants