[ty] Fix invalid diagnostic location for a sub-call to a specialized ParamSpec#23036
[ty] Fix invalid diagnostic location for a sub-call to a specialized ParamSpec#23036dhruvmanila merged 15 commits intoastral-sh:mainfrom
Conversation
Signed-off-by: Bhuminjay <[email protected]>
Signed-off-by: Bhuminjay <[email protected]>
60fc1a5 to
5c27788
Compare
Typing conformance resultsNo changes detected ✅ |
Signed-off-by: Bhuminjay <[email protected]>
Signed-off-by: Bhuminjay <[email protected]>
dhruvmanila
left a comment
There was a problem hiding this comment.
Thank you! I've some changes that I've recommended but otherwise this looks good.
crates/ty_python_semantic/resources/mdtest/param_spec_errors.md
Outdated
Show resolved
Hide resolved
crates/ty_python_semantic/resources/mdtest/param_spec_errors.md
Outdated
Show resolved
Hide resolved
|
(I've removed the "fixes" directive as there are other parts that are still remaining after this PR.) |
Signed-off-by: Bhuminjay <[email protected]>
…c_errors.md_-_test_for_paramspec_e…_(4b332d9e024d6e7b).snap
|
|
|
Mypy-primer is failing because of this panic: https://github.com/astral-sh/ruff/actions/runs/21655910487/job/62430518631?pr=23036#step:6:1100 Seems likely to have been introduced by the changes in this PR. If you are not sure what the cause is, you can clone jax and run ty on it and try to reproduce locally. |
Signed-off-by: Bhuminjay <[email protected]>
…tion' into fix_diagnostic_location
Signed-off-by: Bhuminjay <[email protected]>
Signed-off-by: Bhuminjay <[email protected]>
|
Thank you very much for pointing it , I was able to debug it, the issue was at call due to offset out of bounds error, even with my initial approach of max index check it was failing the core , at the call sites the synthetic args are not counted so I subtracted it accordingly & it passes now. Thank you : ) |
Signed-off-by: Bhuminjay <[email protected]>
* main: (45 commits) [ty] Fix wrong inlay hints for overloaded function arguments (astral-sh#23179) [ty] Respect `@no_type_check` when combined with other decorators (astral-sh#23177) [ty] Use type context when inferring constructor argument types (astral-sh#23139) [`airflow`] Add ruff rules to catch deprecated attribute access from context key for Airflow 3.0 (`AIR301`) (astral-sh#22850) Support formatting `pycon` markdown code blocks (astral-sh#23112) Markdown formatting in LSP (astral-sh#23063) Instruct Claude to use comments more sparingly (astral-sh#23181) [`flake8-gettext`] Fix false negatives for plural argument of ngettext (`INT001`, `INT002`, `INT003`) (astral-sh#21078) [ty] Invoking goto-def on parentheses of a class constructor call takes you too constructor method [ty] Make goto definition on class constructor always go to class definition [ty] Assign lower completions ranking to deprecated functions and classes (astral-sh#23089) [ty] Fix parameter references across files via keyword args (astral-sh#23012) [ty] Exclude enclosing class for base completions (astral-sh#23141) [`pyupgrade`] Fix syntax error on string with newline escape and comment (`UP037`) (astral-sh#22968) [ty] Improve documentation for `expect_single_definition` method (astral-sh#23175) [ty] Configure check mode for all projects Add `home-assistant` to ecosystem projects (astral-sh#23132) Add tabbed shell completion documentation (astral-sh#23169) Bump typing conformance-suite pin (astral-sh#23174) [ty] Fix invalid diagnostic location for a sub-call to a specialized ParamSpec (astral-sh#23036) ...
Summary
This PR fixes part of astral-sh/ty#2198
Test Plan
Added mdtest & snapshots:
Sample Example
for code:
before
After: