mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
[pycodestyle
] Preserve original value format (E731
) (#15097)
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
03bb9425df
commit
9eb73cb7e0
3 changed files with 170 additions and 31 deletions
|
@ -156,3 +156,24 @@ from typing import Callable
|
|||
class FilterDataclass:
|
||||
# OK
|
||||
filter: Callable[[str], bool] = lambda _: True
|
||||
|
||||
|
||||
# Regression tests for:
|
||||
# * https://github.com/astral-sh/ruff/issues/7720
|
||||
x = lambda: """
|
||||
a
|
||||
b
|
||||
"""
|
||||
|
||||
# * https://github.com/astral-sh/ruff/issues/10277
|
||||
at_least_one_million = lambda _: _ >= 1_000_000
|
||||
|
||||
x = lambda: (
|
||||
# comment
|
||||
5 + 10
|
||||
)
|
||||
|
||||
x = lambda: (
|
||||
# comment
|
||||
y := 10
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue