Skip to content

unexpected-spaces-around-keyword-parameter-equals (E251) - conflicts with formatter / false positive on python 3.13 type var defaults #13699

@DetachHead

Description

@DetachHead
def foo[T = int](): ... # Unexpected spaces around keyword / parameter equals

https://play.ruff.rs/ae847913-3125-4fe5-88a5-376630dfd337

i think it's best to keep the spaces because it would look strange especially when used with bounds:

def foo[T: int | str=int](): ...

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpython313Related to Python 3.13

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions