-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugSomething isn't workingSomething isn't workingformatterRelated to the formatterRelated to the formatter
Milestone
Description
I just fund a small difference with the black formatter.
- A minimal code snippet that reproduces the bug.
This is the black formatted example (imho, this also looks nicer):
def some_function():
if "root" not in (
long_tree_name_tree.split("/")[0]
for long_tree_name_tree in really_really_long_variable_name
):
msg = "Could not find root. Please try a different forest."
raise ValueError(msg)which gets reformatted to:
def some_function():
if (
"root"
not in (
long_tree_name_tree.split("/")[0]
for long_tree_name_tree in really_really_long_variable_name
)
):
msg = "Could not find root. Please try a different forest."
raise ValueError(msg)- The command you invoked (e.g.,
ruff /path/to/file.py --fix), ideally including the--isolatedflag.
ruff format --isolated filename.py- The current Ruff settings (any relevant sections from your
pyproject.toml).
None. This is a standalone script.
- The current Ruff version (
ruff --version).
ruff 0.0.292
ruff 0.1.0
(I tried it with both versions)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingformatterRelated to the formatterRelated to the formatter