-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[red-knot] Document 'public type of undeclared symbols' behavior #16096
Conversation
57b4851
to
68e979b
Compare
68e979b
to
3136623
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this is great
crates/red_knot_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md
Outdated
Show resolved
Hide resolved
crates/red_knot_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md
Outdated
Show resolved
Hide resolved
crates/red_knot_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md
Outdated
Show resolved
Hide resolved
crates/red_knot_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md
Outdated
Show resolved
Hide resolved
crates/red_knot_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent, thanks for writing it up!
crates/red_knot_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md
Outdated
Show resolved
Hide resolved
crates/red_knot_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md
Outdated
Show resolved
Hide resolved
crates/red_knot_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md
Outdated
Show resolved
Hide resolved
crates/red_knot_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
crates/red_knot_python_semantic/resources/mdtest/doc/public_type_undeclared_symbols.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent, thank you!
Summary
After I was asked twice within the same day, I thought it would be a good idea to write some user facing documentation that explains our reasoning behind inferring
Unknown | T_inferred
for public uses of undeclared symbols. This is a major deviation from the behavior of other type checkers and it seems like a good practice to defend our choice like this. Please let me know if I missed something or if you see a chance to explain this more clearly.Rendered version