Skip to content

Regression of false positive with e251 and type statement type variable defaults #15202

@mikeshardmind

Description

@mikeshardmind

ruff version 0.8.4
python version 3.13

prior issue: #13699 prior PR: #13704

src\salamander\_type_stuff.py:37:20: E251 [*] Unexpected spaces around keyword / parameter equals
   |
37 | type Coro[T: object = Any] = Coroutine[None, None, T]
   |                    ^ E251
   |
   = help: Remove whitespace

src\salamander\_type_stuff.py:37:22: E251 [*] Unexpected spaces around keyword / parameter equals
   |
37 | type Coro[T: object = Any] = Coroutine[None, None, T]
   |                      ^ E251
   |
   = help: Remove whitespace

These are false positives.

Applying the fix leads to (correctly) identifying:

src\salamander\_type_stuff.py:37:20: E225 [*] Missing whitespace around operator
   |
37 | type Coro[T: object=Any] = Coroutine[None, None, T]
   |                    ^ E225
   |
   = help: Add missing whitespace

config is here if useful

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions especially welcomepython313Related to Python 3.13

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions