Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redo import handling #566

Merged
merged 13 commits into from
Dec 31, 2022
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Simplify import handling; stop trying to import modules at type checking time (#566)
- Suggest using keyword arguments on calls with too many positional arguments (#572)
- Emit an error for unknown `TypedDict` keys (#567)
- Improve type inference for f-strings containing literals (#571)
Expand Down
4 changes: 3 additions & 1 deletion pyanalyze/error_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ class ErrorCode(enum.Enum):
invalid_annotated_assignment = 79
unused_assignment = 80
incompatible_yield = 81
too_many_positional_args = 82
invalid_import = 82
too_many_positional_args = 83


# Allow testing unannotated functions without too much fuss
Expand Down Expand Up @@ -221,6 +222,7 @@ class ErrorCode(enum.Enum):
ErrorCode.invalid_annotated_assignment: "Invalid annotated assignment",
ErrorCode.unused_assignment: "Assigned value is never used",
ErrorCode.incompatible_yield: "Incompatible yield type",
ErrorCode.invalid_import: "Invalid import",
ErrorCode.too_many_positional_args: (
"Call with many positional arguments should use keyword arguments"
),
Expand Down
Loading