-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Auto-format Python code with ruff format #23154
base: main
Are you sure you want to change the base?
Conversation
78bf58a
to
1f1d944
Compare
@@ -407,8 +407,7 @@ def metafunc(self, fs, *args, **kwargs): | |||
assert fs is None | |||
func(self, *args, **kwargs) | |||
|
|||
parameterize(metafunc, {'': (None,), | |||
'nodefs': ('nodefs',)}) | |||
parameterize(metafunc, {'': (None,), 'nodefs': ('nodefs',)}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these uses of parameterize
are deliberately spread so that there is one test case per line. Its important for readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the format suppression
comment in the commit message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a trailing comma after the last dict item will cause ruff format
to make things clear.
parameterize(metafunc, {'': (None,), 'nodefs': ('nodefs',)}) | |
parameterize( | |
metafunc, | |
{ | |
'': (None,), | |
'nodefs': ('nodefs',), | |
}, | |
) | |
Fixes: #14449
Use
ruff format
to format Python code. https://docs.astral.sh/ruff/formatterSettings in
pyproject.toml
are all subject to discussion:ruff format
command after the existingruff check
test in CircleCI..style.yapf
because maintainers should agree on a single Python code formatter.# fmt: off
and# fmt: on
Any hints on the CircleCI:
build-docs
failure?