Skip to content
Snippets Groups Projects
Commit f89aeb38 authored by Hock, Martin's avatar Hock, Martin
Browse files

Adjust class function upper/lower case for ast.

parent f9f0c9ce
Branches
Tags
2 merge requests!65Release v0.3.0,!64New year developments
Pipeline #888965 failed
......@@ -259,13 +259,13 @@ class Analyzer(ast.NodeVisitor):
"from": [],
}
def visit_Import(self, node: ast.Import) -> None:
def visit_import(self, node: ast.Import) -> None:
"""Get modules that are imported with the 'import' statement."""
for alias in node.names:
self.stats["import"].append(alias.name)
self.generic_visit(node)
def visit_ImportFrom(self, node: ast.ImportFrom) -> None:
def visit_import_from(self, node: ast.ImportFrom) -> None:
"""Get modules that are imported with the 'from X import Y' statement."""
self.stats["from"].append(str(node.module))
self.generic_visit(node)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment