Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
DetachHead opened this issue Oct 10, 2024 · 1 comment · Fixed by #13704
Assignees
Labels
bug Something isn't working python313 Related to Python 3.13

Comments

@DetachHead
Copy link

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](): ...
@KotlinIsland
Copy link
Contributor

it type parameters should be consistent with value parameters

def foo[T: int = 1](t: int = 1): ...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working python313 Related to Python 3.13
Projects
None yet
4 participants