[ty] Add type-expression syntax link to invalid-type-expression#18104
Merged
[ty] Add type-expression syntax link to invalid-type-expression#18104
Conversation
sharkdp
commented
May 14, 2025
Member
|
Could you also add the link to this one: ruff/crates/ty_python_semantic/src/types/infer.rs Lines 8574 to 8582 in 4b003d9 |
Contributor
|
Member
|
And maybe this one? ruff/crates/ty_python_semantic/src/types/infer.rs Lines 8803 to 8809 in 4b003d9 |
Member
|
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 |
4b003d9 to
d2ecdf2
Compare
sharkdp
commented
May 14, 2025
d2ecdf2 to
7f95fe8
Compare
AlexWaygood
reviewed
May 14, 2025
Comment on lines
+12
to
13
| use crate::types::LintDiagnosticGuard; | ||
| use crate::types::{protocol_class::ProtocolClassLiteral, KnownFunction, KnownInstanceType, Type}; |
Member
There was a problem hiding this comment.
if you do this then maybe you don't get any line numbers changing in the generated docs :P
Suggested change
| use crate::types::LintDiagnosticGuard; | |
| use crate::types::{protocol_class::ProtocolClassLiteral, KnownFunction, KnownInstanceType, Type}; | |
| use crate::types::{protocol_class::ProtocolClassLiteral, KnownFunction, KnownInstanceType, LintDiagnosticGuard, Type}; |
AlexWaygood
approved these changes
May 14, 2025
dcreager
added a commit
that referenced
this pull request
May 14, 2025
…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)
Glyphack
pushed a commit
to Glyphack/ruff
that referenced
this pull request
May 21, 2025
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a link to this page when emitting
invalid-type-expressiondiagnostics: