Skip to content

Conversation

sharkdp
Copy link
Contributor

@sharkdp sharkdp commented Sep 1, 2025

Summary

__init_subclass__ is implicitly a classmethod.

closes astral-sh/ty#1106

Test Plan

Regression test

@sharkdp sharkdp added the ty Multi-file analysis & type inference label Sep 1, 2025
Copy link
Contributor

github-actions bot commented Sep 1, 2025

Diagnostic diff on typing conformance tests

No changes detected when running ty on typing conformance tests ✅

Copy link
Contributor

github-actions bot commented Sep 1, 2025

mypy_primer results

No ecosystem changes detected ✅
No memory usage changes detected ✅

@sharkdp sharkdp merged commit 5518c84 into main Sep 1, 2025
38 checks passed
@sharkdp sharkdp deleted the david/fix-1106 branch September 1, 2025 08:16
dcreager added a commit that referenced this pull request Sep 2, 2025
* main: (28 commits)
  [ty] `__class_getitem__` is a classmethod (#20192)
  [ty] Support `__init_subclass__` (#20190)
  Update dependency ruff to v0.12.11 (#20184)
  Update rui314/setup-mold digest to 725a879 (#20181)
  Update CodSpeedHQ/action action to v3.8.1 (#20183)
  Update cargo-bins/cargo-binstall action to v1.15.3 (#20182)
  Update Rust crate camino to v1.1.12 (#20185)
  Update Rust crate clap to v4.5.46 (#20186)
  Update Rust crate mimalloc to v0.1.48 (#20187)
  [ty] Sync vendored typeshed stubs (#20188)
  [ty] improve cycle-detection coverage for apply_type_mapping (#20159)
  [ty] don't assume that deferred type inference means deferred name resolution (#20160)
  Less confidently mark f-strings as empty when inferring truthiness (#20152)
  [ty] skip a slow seed in fuzzer (#20161)
  Revert "[ty] Use `invalid-assignment` error code for invalid assignments to `ClassVar`s" (#20158)
  [ty] add six ecosystem projects to good.txt (#20157)
  [ty] Use `invalid-assignment` error code for invalid assignments to `ClassVar`s (#20156)
  [ty] minor TypedDict fixes (#20146)
  [ty] ensure union normalization really normalizes (#20147)
  [ty] typecheck dict methods for `TypedDict` (#19874)
  ...
second-ed pushed a commit to second-ed/ruff that referenced this pull request Sep 9, 2025
## Summary

`__init_subclass__` is implicitly a classmethod.

closes astral-sh/ty#1106

## Test Plan

Regression test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ty treats cls of __init_subclass__ as self.

2 participants