[ty] Support narrowing for extended walrus targets#24129
Merged
Conversation
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 85.38%. The percentage of expected errors that received a diagnostic held steady at 78.70%. The number of fully passing files held steady at 64/132. |
Memory usage reportMemory usage unchanged ✅ |
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
unresolved-attribute |
0 | 2 | 0 |
invalid-argument-type |
0 | 1 | 0 |
not-iterable |
0 | 1 | 0 |
| Total | 0 | 4 | 0 |
Raw diff:
rotki (https://github.com/rotki/rotki)
- rotkehlchen/api/v1/schemas.py:349:14 error[unresolved-attribute] Attribute `is_evm_or_evmlike` is not defined on `None` in union `SupportedBlockchain | None`
- rotkehlchen/api/v1/schemas.py:350:14 error[unresolved-attribute] Attribute `is_substrate` is not defined on `None` in union `SupportedBlockchain | None`
- rotkehlchen/api/v1/schemas.py:355:43 error[invalid-argument-type] Argument to function `is_valid_bitcoin_address` is incorrect: Expected `SupportedBlockchain`, found `SupportedBlockchain | None`
- rotkehlchen/history/price.py:230:37 error[not-iterable] Object of type `list[UnderlyingToken] | None` may not be iterable
carljm
approved these changes
Mar 24, 2026
Contributor
carljm
left a comment
There was a problem hiding this comment.
There were some bugs here where prior narrowing state didn't get cleared correctly; required some re-ordering of operations in the semantic index builder to avoid that.
carljm
added a commit
that referenced
this pull request
Mar 25, 2026
* main: [ty] Avoid eager TypedDict diagnostics in `TypedDict | dict` unions (#24151) `F507`: Fix false negative for non-tuple RHS in `%`-formatting (#24142) [ty] Update `SpecializationBuilder` hook to get both lower/upper bounds (#23848) Fix `%foo?` parsing in IPython assignment expressions (#24152) `E501`/`W505`/formatter: Exclude nested pragma comments from line width calculation (#24071) [ty] Fix Salsa panic propagation (#24141) [ty] Support `type:ignore[ty:code]` suppressions (#24096) [ty] Support narrowing for extended walrus targets (#24129)
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
Closes astral-sh/ty#3103.