Merged
Conversation
Diagnostic diff on typing conformance testsNo changes detected when running ty on typing conformance tests ✅ |
|
MichaReiser
reviewed
Dec 5, 2025
crates/ty_ide/src/rename.rs
Outdated
Comment on lines
1477
to
1488
| "mypackage/__init__.py", | ||
| r#" | ||
| class Foo: | ||
| @property | ||
| def my_property<CURSOR>(self) -> int: | ||
| return 42 | ||
| "#, | ||
| ) | ||
| .source( | ||
| "mypackage/subpkg/__init__.py", | ||
| r#" | ||
| from mypackage import Foo |
Member
There was a problem hiding this comment.
You probably copy pasted my tests where I messed this up. Do we need the subpackage complexity here or could we just go with main.py and lib.py?
Member
Author
There was a problem hiding this comment.
Me? Copy and paste? I'm mortally offended (yes, you're right)
MichaReiser
approved these changes
Dec 5, 2025
dcreager
added a commit
that referenced
this pull request
Dec 5, 2025
* origin/main: (41 commits) [ty] Carry generic context through when converting class into `Callable` (#21798) [ty] Add more tests for renamings (#21810) [ty] Minor improvements to `assert_type` diagnostics (#21811) [ty] Add some attribute/method renaming test cases (#21809) Update mkdocs-material to 9.7.0 (Insiders now free) (#21797) Remove unused whitespaces in test cases (#21806) [ty] fix panic when instantiating a type variable with invalid constraints (#21663) [ty] fix build failure caused by conflicts between #21683 and #21800 (#21802) [ty] do nothing with `store_expression_type` if `inner_expression_inference_state` is `Get` (#21718) [ty] increase the limit on the number of elements in a non-recursively defined literal union (#21683) [ty] normalize typevar bounds/constraints in cycles (#21800) [ty] Update completion eval to include modules [ty] Add modules to auto-import [ty] Add support for module-only import requests [ty] Refactor auto-import symbol info [ty] Clarify the use of `SymbolKind` in auto-import [ty] Redact ranking of completions from e2e LSP tests [ty] Tweaks tests to use clearer language [ty] Update evaluation results [ty] Make auto-import ignore symbols in modules starting with a `_` ...
This was referenced Dec 5, 2025
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
Following on from #21809, this PR adds a few more renaming test cases: tests for
@propertys,@singledispatch-decorated functions, and@singledispatchmethod-decorated methods. The@singledispatch(method)-decorated functions all seem to work great, but we don't do as good a job as Pylance on properties with setters and/or deleters right now. (See the TODOs added in these tests.)Test Plan
N/A