Don't trace if we check a non python module for just docs
This commit is contained in:
parent
d488bd57cc
commit
48ce4b7d70
1 changed files with 7 additions and 4 deletions
|
@ -120,10 +120,13 @@ class ModuleValidator(Validator):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _just_docs(self):
|
def _just_docs(self):
|
||||||
for child in self.ast.body:
|
try:
|
||||||
if not isinstance(child, ast.Assign):
|
for child in self.ast.body:
|
||||||
return False
|
if not isinstance(child, ast.Assign):
|
||||||
return True
|
return False
|
||||||
|
return True
|
||||||
|
except AttributeError:
|
||||||
|
return False
|
||||||
|
|
||||||
def _is_bottom_import_blacklisted(self):
|
def _is_bottom_import_blacklisted(self):
|
||||||
return self.object_name in self.BOTTOM_IMPORTS_BLACKLIST
|
return self.object_name in self.BOTTOM_IMPORTS_BLACKLIST
|
||||||
|
|
Loading…
Reference in a new issue