guilatrova / tryceratops

A linter to prevent exception handling antipatterns in Python (limited only for those who like dinosaurs).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

isinstance(x, Callable) => callable(x)

sbrugman opened this issue · comments

@guilatrova Would you be open to adding a Violation for the following? Not directly related to exceptions other than through 32

from typing import Callable

if isinstance(x, Callable):
    pass

which should be:

if callable(x):
    pass

I'm afraid that if we go through this path, Tryceratops will lose its focus.

Let's stick to try/except and exception scenarios.