Expand Semantic Syntax Coverage#17725
Merged
ntBre merged 3 commits intoastral-sh:mainfrom Apr 30, 2025
Merged
Conversation
for ReboundComprehensionVariable, MultipleCaseAssignments, and DuplicateTypeParameter
for ReboundComprehensionVariable, MultipleCaseAssignments, and DuplicateTypeParameter
Contributor
|
Contributor
|
carljm
reviewed
Apr 29, 2025
Contributor
carljm
left a comment
There was a problem hiding this comment.
The red-knot tests here look good to me!
ntBre
approved these changes
Apr 30, 2025
Contributor
ntBre
left a comment
There was a problem hiding this comment.
This looks great, thank you!
Should that happen here or should we merge this PR such that the refactor test_async_comprehension_in_sync_comprehension → test_semantic_error is available on main and others can chime in, too?
I'll go ahead and merge this, and we can handle others in additional PRs. I think it makes sense to batch a few of them like you did here, though, instead of necessarily one PR per error, at least if the tests are pretty straightforward.
dcreager
added a commit
that referenced
this pull request
May 1, 2025
* main: [red-knot] Preliminary `NamedTuple` support (#17738) [red-knot] Add tests for classes that have incompatible `__new__` and `__init__` methods (#17747) Update dependency vite to v6.2.7 (#17746) [red-knot] Update call binding to return all matching overloads (#17618) [`airflow`] apply Replacement::AutoImport to `AIR312` (#17570) [`ruff`] Add fix safety section (`RUF028`) (#17722) [syntax-errors] Detect single starred expression assignment `x = *y` (#17624) py-fuzzer: fix minimization logic when `--only-new-bugs` is passed (#17739) Fix example syntax for pydocstyle ignore_var_parameters option (#17740) [red-knot] Update salsa to prevent panic in custom panic-handler (#17742) [red-knot] Ban direct instantiation of generic protocols as well as non-generic ones (#17741) [red-knot] Lookup of `__new__` (#17733) [red-knot] Check decorator consistency on overloads (#17684) [`flake8-use-pathlib`] Avoid suggesting `Path.iterdir()` for `os.listdir` with file descriptor (`PTH208`) (#17715) [red-knot] Check overloads without an implementation (#17681) Expand Semantic Syntax Coverage (#17725) [red-knot] Check for invalid overload usages (#17609)
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.
Re: #17526
Summary
Adds tests to red knot and
linter.rsfor the semantic syntax.Specifically add tests for
ReboundComprehensionVariable,DuplicateTypeParameter, andMultipleCaseAssignment.Refactor the
test_async_comprehension_in_sync_comprehension→test_semantic_errorto be more general for all semantic syntax test cases.Test Plan
This is a test.
Question
I'm happy to contribute more tests the coming days.
Should that happen here or should we merge this PR such that the refactor
test_async_comprehension_in_sync_comprehension→test_semantic_erroris available on main and others can chime in, too?