ruff icon indicating copy to clipboard operation
ruff copied to clipboard

`typing-modules` should respect relative imports

Open charliermarsh opened this issue 2 years ago • 1 comments

See: #1976.

charliermarsh avatar Jan 19 '23 22:01 charliermarsh

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

sbrugman avatar Jan 23 '23 21:01 sbrugman

Closed by https://github.com/charliermarsh/ruff/pull/2615 ?

henryiii avatar Feb 07 '23 01:02 henryiii

Yes, thank you, I linked the wrong issue 🤦

charliermarsh avatar Feb 07 '23 02:02 charliermarsh