ruff
0b918ae4 - [ty] Improve check enforcing that an overloaded function must have an implementation (#21978)

Commit
5 days ago
[ty] Improve check enforcing that an overloaded function must have an implementation (#21978) ## Summary - Treat `if TYPE_CHECKING` blocks the same as stub files (the feature requested in https://github.com/astral-sh/ty/issues/1216) - We currently only allow `@abstractmethod`-decorated methods to omit the implementation if they're methods in classes that have _exactly_ `ABCMeta` as their metaclass. That seems wrong -- `@abstractmethod` has the same semantics if a class has a subclass of `ABCMeta` as its metaclass. This PR fixes that too. (I'm actually not _totally_ sure we should care what the class's metaclass is at all -- see discussion in https://github.com/astral-sh/ty/issues/1877#issue-3725937441... but the change this PR is making seems less wrong than what we have currently, anyway.) Fixes https://github.com/astral-sh/ty/issues/1216 ## Test Plan Mdtests and snapshots
Author
Parents
Loading