mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 13:06:53 +00:00
use isclass instead of not isfunction
It is not always true that `not isfunction(...) is isclass(...)`
This commit is contained in:
parent
a929f124c8
commit
88bd986740
1 changed files with 1 additions and 1 deletions
|
|
@ -272,7 +272,7 @@ def _parameters_for(func: Any) -> dict[str, bool]:
|
|||
A dictionary mapping the parameter name to whether or not it is
|
||||
required (a.k.a., is positional only/does not have a default).
|
||||
"""
|
||||
is_class = not inspect.isfunction(func)
|
||||
is_class = inspect.isclass(func)
|
||||
if is_class:
|
||||
func = func.__init__
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue