Merged
Conversation
Member
Author
|
Yikes, the |
384b697 to
6e9b398
Compare
6e9b398 to
1f0f03c
Compare
Member
|
Are those checks failing because main isn't building? |
MichaReiser
approved these changes
Nov 6, 2025
dhruvmanila
commented
Nov 6, 2025
Comment on lines
4897
to
4903
| if let Some(default) = arguments.find_keyword("default") { | ||
| let func_ty = self.get_or_infer_expression(func, TypeContext::default()); | ||
| let func_ty = self | ||
| .try_expression_type(func) | ||
| .unwrap_or_else(|| self.infer_expression(func, TypeContext::default())); | ||
| if func_ty.as_class_literal().is_some_and(|class_literal| { | ||
| class_literal.is_known(self.db(), KnownClass::ParamSpec) | ||
| }) { |
Member
Author
There was a problem hiding this comment.
I think at this point, the expression should've already been inferred because this is in the deferred region and the function symbol should've already been inferred. So, I could directly use self.expression_type instead.
Member
Author
Yes! |
Member
|
Let's merge it. We can easily change it to not use |
dcreager
added a commit
that referenced
this pull request
Nov 7, 2025
* origin/main: Remove duplicate preview tests for `FURB101` and `FURB103` (#21303) [ty] Add support for `Literal`s in implicit type aliases (#21296) [ty] Add missing `heap_size` to `variance_of` queries (#21318) [`pyupgrade`] Fix false positive on relative imports from local `.builtins` module (`UP029`) (#21309) [ty] Make range/position conversions fallible (#21297) Bump 0.14.4 (#21306) Fix main by using `infer_expression` (#21299) [ty] Understand legacy and PEP 695 `ParamSpec` (#21139) [ty] Discover site-packages from the environment that ty is installed in (#21286) [ty] Make special cases for `UnionType` slightly narrower (#21276) Require ignore 0.4.24 in `Cargo.toml` (#21292) [ty] Favour imported symbols over builtin symbols (#21285) docs: revise Ruff setup instructions for Zed editor (#20935) [ty] Update salsa (#21281) [syntax-error]: no binding for nonlocal PLE0117 as a semantic syntax error (#21032)
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.
No description provided.