mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 11:59:10 +00:00
Avoid line break before for
in comprehension if outer expression expands (#5912)
This commit is contained in:
parent
c2b7b46717
commit
eeb8a5fe0a
10 changed files with 107 additions and 12 deletions
|
@ -74,4 +74,15 @@
|
|||
a, # Trailing
|
||||
) in this_is_a_very_long_variable_which_will_cause_a_trailing_comma_which_breaks_the_comprehension # Trailing
|
||||
} # Trailing
|
||||
# Trailing
|
||||
# Trailing
|
||||
|
||||
|
||||
# Regression tests for https://github.com/astral-sh/ruff/issues/5911
|
||||
selected_choices = {
|
||||
k: str(v) for v in value if str(v) not in self.choices.field.empty_values
|
||||
}
|
||||
|
||||
selected_choices = {
|
||||
k: str(v)
|
||||
for vvvvvvvvvvvvvvvvvvvvvvv in value if str(v) not in self.choices.field.empty_values
|
||||
}
|
||||
|
|
|
@ -43,3 +43,13 @@
|
|||
if
|
||||
gggggggggggggggggggggggggggggggggggggggggggg
|
||||
]
|
||||
|
||||
# Regression tests for https://github.com/astral-sh/ruff/issues/5911
|
||||
selected_choices = [
|
||||
str(v) for v in value if str(v) not in self.choices.field.empty_values
|
||||
]
|
||||
|
||||
selected_choices = [
|
||||
str(v)
|
||||
for vvvvvvvvvvvvvvvvvvvvvvv in value if str(v) not in self.choices.field.empty_values
|
||||
]
|
||||
|
|
|
@ -43,3 +43,13 @@
|
|||
if
|
||||
gggggggggggggggggggggggggggggggggggggggggggg
|
||||
}
|
||||
|
||||
# Regression tests for https://github.com/astral-sh/ruff/issues/5911
|
||||
selected_choices = {
|
||||
str(v) for v in value if str(v) not in self.choices.field.empty_values
|
||||
}
|
||||
|
||||
selected_choices = {
|
||||
str(v)
|
||||
for vvvvvvvvvvvvvvvvvvvvvvv in value if str(v) not in self.choices.field.empty_values
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue