Skip to content

Conversation

@srittau
Copy link
Collaborator

@srittau srittau commented Apr 26, 2021

This introduces newlines before decorators.

This introduces newlines before decorators.
Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer we run with --skip-magic-trailing-comma that I added in this release, thoughts? Helps keep definitions compact when they fit on one line.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

This reverts commit 25fc8c2.

There seems to be a discrepancy between running black with
"--diff --check" and running it without it when using
--skip-magic-trailing-comma. It's possible that the options
from pyproject.toml are ignored when --check is used.
@srittau
Copy link
Collaborator Author

srittau commented Apr 26, 2021

Unfortunately, there is a discrepancy between running black with --check --diff and running it without it when using skip_magic_trailing_comma = true, which makes it impossible to use this option for now.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
Copy link
Collaborator Author

srittau commented Apr 26, 2021

I couldn't isolate the black problem so far, but the problem can be reproduced locally by running black --check --diff stdlib (showing diffs) and running black --check stdlib (saying all files unchanged).

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
Copy link
Collaborator Author

srittau commented Apr 26, 2021

Weirdly enough, if I copy my typeshed directory (just doing cp -r), black will be consistent in the new location. I have no time to investigate this further at the moment and suggest to start without skip_magic_trailing_comma for now.

@srittau
Copy link
Collaborator Author

srittau commented Apr 26, 2021

Different computer:

srittau@blitz:~/Projekte$ diff -u --recursive typeshed typeshed2
srittau@blitz:~/Projekte$ 
(.venv-3.9) srittau@blitz:~/Projekte/typeshed$ black stubs/ stdlib/ --check
All done! ✨ 🍰 ✨
1334 files would be left unchanged.
(.venv-3.9) srittau@blitz:~/Projekte/typeshed$ 
(.venv-3.9) srittau@blitz:~/Projekte/typeshed2$ black stubs/ stdlib/ --check
would reformat stdlib/logging/config.pyi
would reformat stdlib/importlib/util.pyi
would reformat stdlib/distutils/filelist.pyi
would reformat stdlib/smtpd.pyi
would reformat stdlib/_typeshed/__init__.pyi
would reformat stubs/click/click/formatting.pyi
would reformat stubs/click-spinner/click_spinner/__init__.pyi
would reformat stubs/protobuf/google/protobuf/json_format.pyi
would reformat stdlib/ftplib.pyi
would reformat stubs/redis/redis/lock.pyi
would reformat stubs/waitress/waitress/compat.pyi
would reformat stubs/protobuf/google/protobuf/descriptor.pyi
would reformat stdlib/@python2/logging/__init__.pyi
would reformat stubs/JACK-Client/jack/__init__.pyi
would reformat stdlib/asyncio/base_events.pyi
would reformat stdlib/typing.pyi
would reformat stubs/redis/redis/client.pyi
Oh no! 💥 💔 💥
17 files would be reformatted, 1317 files would be left unchanged.
(.venv-3.9) srittau@blitz:~/Projekte/typeshed2$ 

I am stumped.

@srittau srittau merged commit 4591604 into python:master Apr 26, 2021
@srittau
Copy link
Collaborator Author

srittau commented Apr 26, 2021

I merged the version without skip_magic_trailing_comma for now.

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

Successfully merging this pull request may close these issues.

2 participants