Skip to content

Comments

Track typing module imports#533

Merged
charliermarsh merged 1 commit intomainfrom
charlie/from-imports
Nov 1, 2022
Merged

Track typing module imports#533
charliermarsh merged 1 commit intomainfrom
charlie/from-imports

Conversation

@charliermarsh
Copy link
Member

This PR implements import tracking for typing module references, which lets us avoid the kinds of false-positive errors demonstrated in #490.

Resolves #490.

use rustpython_ast::{Expr, ExprKind};

// TODO(charlie): Some of these are actually from `collections`.
// Review: https://peps.python.org/pep-0585/.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Tackling this in a separate PR.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Importing a function called cast leads to confusing F722 and F821 errors

1 participant