mirror of
https://github.com/astral-sh/ruff.git
synced 2026-11-26 14:29:05 +08:00
493 B
493 B
What it does
Checks for calls to non-callable objects.
Why is this bad?
Calling a non-callable object will raise a TypeError at runtime.
Example
# TypeError: 'int' object is not callable
4() # error
See also
abstract-class-instantiationreports attempts to instantiate a protocol class or a class with unimplemented abstract methods.
Rule history
- v0.0.102: Renamed from
call-non-callable, which remains as a deprecated alias for this rule.