Commit d0a8aeda by finswimmer Committed by GitHub

fix (setup_reader): check if `func.value` has attr `id` (#2041)

parent 960dc063
...@@ -183,6 +183,7 @@ class SetupReader(object): ...@@ -183,6 +183,7 @@ class SetupReader(object):
func = value.func func = value.func
if not (isinstance(func, ast.Name) and func.id == "setup") and not ( if not (isinstance(func, ast.Name) and func.id == "setup") and not (
isinstance(func, ast.Attribute) isinstance(func, ast.Attribute)
and hasattr(func.value, "id")
and func.value.id == "setuptools" and func.value.id == "setuptools"
and func.attr == "setup" and func.attr == "setup"
): ):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment