-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ty] Add type-expression syntax link to invalid-type-expression #18104
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
Conversation
|
Could you also add the link to this one: ruff/crates/ty_python_semantic/src/types/infer.rs Lines 8574 to 8582 in 4b003d9
|
|
|
And maybe this one? ruff/crates/ty_python_semantic/src/types/infer.rs Lines 8803 to 8809 in 4b003d9
|
|
And a link in the rule's docs themselves might also be great: ruff/crates/ty_python_semantic/src/types/diagnostic.rs Lines 789 to 810 in 68559fc
|
AlexWaygood
left a comment
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!!
4b003d9 to
d2ecdf2
Compare
d2ecdf2 to
7f95fe8
Compare
| use crate::types::LintDiagnosticGuard; | ||
| use crate::types::{protocol_class::ProtocolClassLiteral, KnownFunction, KnownInstanceType, Type}; |
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.
if you do this then maybe you don't get any line numbers changing in the generated docs :P
| use crate::types::LintDiagnosticGuard; | |
| use crate::types::{protocol_class::ProtocolClassLiteral, KnownFunction, KnownInstanceType, Type}; | |
| use crate::types::{protocol_class::ProtocolClassLiteral, KnownFunction, KnownInstanceType, LintDiagnosticGuard, Type}; |
…rals * origin/main: [ty] Add type-expression syntax link to invalid-type-expression (#18104) [`flake8-simplify`] add fix safety section (`SIM103`) (#18086) [ty] mypy_primer: fix static-frame setup (#18103) [`flake8-simplify`] Correct behavior for `str.split`/`rsplit` with `maxsplit=0` (`SIM905`) (#18075) [ty] Fix more generics-related TODOs (#18062)
…al-sh#18104) ## Summary Add a link to [this page](https://typing.python.org/en/latest/spec/annotations.html#type-and-annotation-expressions) when emitting `invalid-type-expression` diagnostics.
Summary
Add a link to this page when emitting
invalid-type-expressiondiagnostics: