-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationpreviewRelated to preview mode featuresRelated to preview mode featuresruleImplementing or modifying a lint ruleImplementing or modifying a lint ruletype-inferenceRequires more advanced type inference.Requires more advanced type inference.
Description
It seems like the following should be caught or at least be added to the documented limitations:
from enum import Enum
from typing import Optional
class Letter(Enum):
"""ok."""
A = "A"
class CatchMe:
"""class."""
def f(
letter: Letter = None, # <--- should be caught
word: Optional[str] = None,
catch: CatchMe = None, # <--- should be caught
) -> None:
"""Doc."""- List of keywords you searched for before creating this issue: RUF013
- A minimal code snippet that reproduces the bug: https://play.ruff.rs/afaf262e-0615-4732-83aa-4cc32af930c2
- The command you invoked:
ruff check file.py --select RUF013 - The current Ruff settings: in the snippet.
- The current Ruff version: 0.7.1
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationpreviewRelated to preview mode featuresRelated to preview mode featuresruleImplementing or modifying a lint ruleImplementing or modifying a lint ruletype-inferenceRequires more advanced type inference.Requires more advanced type inference.