Skip to content

[ty] Classify cls as class parameter#21944

Merged
MichaReiser merged 1 commit intomainfrom
micha/cls-semantic-tokens
Dec 12, 2025
Merged

[ty] Classify cls as class parameter#21944
MichaReiser merged 1 commit intomainfrom
micha/cls-semantic-tokens

Conversation

@MichaReiser
Copy link
Member

Summary

Classify usages of the cls parameter as ClsParameter.

Test Plan

I updated the tests to have cls usages in the body and verified that they were incorrectly classified as Parameter.

Now, with the changes in this PR, they're correctly classified as ClsParameter

@MichaReiser MichaReiser added server Related to the LSP server ty Multi-file analysis & type inference labels Dec 12, 2025
@astral-sh-bot
Copy link

astral-sh-bot bot commented Dec 12, 2025

Diagnostic diff on typing conformance tests

No changes detected when running ty on typing conformance tests ✅

@AlexWaygood AlexWaygood removed their request for review December 12, 2025 12:35
@astral-sh-bot
Copy link

astral-sh-bot bot commented Dec 12, 2025

mypy_primer results

Changes were detected when running on open source projects
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- pandas-stubs/_typing.pyi:1217:16: warning[unused-ignore-comment] Unused blanket `type: ignore` directive
- Found 5133 diagnostics
+ Found 5132 diagnostics

No memory usage changes detected ✅

@MichaReiser MichaReiser requested review from AlexWaygood, BurntSushi and dhruvmanila and removed request for carljm, dcreager and sharkdp December 12, 2025 12:40
@MichaReiser MichaReiser merged commit bc8efa2 into main Dec 12, 2025
44 checks passed
@MichaReiser MichaReiser deleted the micha/cls-semantic-tokens branch December 12, 2025 12:54
dcreager added a commit that referenced this pull request Dec 13, 2025
* origin/main: (22 commits)
  [ty] Allow gradual lower/upper bounds in a constraint set (#21957)
  [ty] disallow explicit specialization of type variables themselves (#21938)
  [ty] Improve diagnostics for unsupported binary operations and unsupported augmented assignments (#21947)
  [ty] update implicit root docs (#21955)
  [ty] Enable even more goto-definition on inlay hints (#21950)
  Document known lambda formatting deviations from Black (#21954)
  [ty] fix hover type on named expression target (#21952)
  Bump benchmark dependencies (#21951)
  Keep lambda parameters on one line and parenthesize the body if it expands (#21385)
  [ty] Improve resolution of absolute imports in tests (#21817)
  [ty] Support `__all__ += submodule.__all__`
  [ty] Change frequency of invalid `__all__` debug message
  [ty] Add `KnownUnion::to_type()` (#21948)
  [ty] Classify `cls` as class parameter (#21944)
  [ty] Stabilize rename (#21940)
  [ty] Ignore `__all__` for document and workspace symbol requests
  [ty] Attach db to background request handler task (#21941)
  [ty] Fix outdated version in publish diagnostics after `didChange` (#21943)
  [ty] avoid fixpoint unioning of types containing current-cycle Divergent (#21910)
  [ty] improve bad specialization results & error messages (#21840)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server Related to the LSP server ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants