mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-01 12:25:10 +00:00
fix: Don't omit optional parentheses for subscripts (#7380)
This commit is contained in:
parent
04183b0299
commit
a65efcf459
6 changed files with 53 additions and 50 deletions
|
|
@ -91,3 +91,10 @@ f = "f"[:,]
|
|||
g1 = "g"[(1):(2)]
|
||||
g2 = "g"[(1):(2):(3)]
|
||||
|
||||
# Don't omit optional parentheses for subscripts
|
||||
# https://github.com/astral-sh/ruff/issues/7319
|
||||
def f():
|
||||
return (
|
||||
package_version is not None
|
||||
and package_version.split(".")[:2] == package_info.version.split(".")[:2]
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue