ruff
ruff copied to clipboard
`typing-modules` should respect relative imports
See: #1976.
Some relevant code sections in case anyone wants to take this (played around a bit, no fix yet):
- Import bindings: https://github.com/charliermarsh/ruff/blob/main/src/checkers/ast.rs#L3802
- Diagnostic: https://github.com/charliermarsh/ruff/blob/main/src/checkers/ast.rs#L3890
- Matching 'Load' e.g.
Literal[...]: https://github.com/charliermarsh/ruff/blob/main/src/checkers/ast.rs#L3266 - Checking for
typing-modules: https://github.com/charliermarsh/ruff/blob/main/src/python/typing.rs#L214 - Relative imports: https://github.com/charliermarsh/ruff/blob/main/src/checkers/ast.rs#L237
Closed by https://github.com/charliermarsh/ruff/pull/2615 ?
Yes, thank you, I linked the wrong issue 🤦