mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-11-22 09:39:30 +00:00
type: add type annotation pylint check
Also run pylint against tests tree
This commit is contained in:
1 parent
71c5d58264
commit
0bd22a049c
39 files changed
+190
-61
No files matched your search
@@ -206,13 +206,12 @@ class ImportOrder(BaseRawFileChecker):
|
||||
Args:
|
||||
node(nodes.Module): module node to check
|
||||
"""
|
||||
root_module, *_ = node.qname().split(".")
|
||||
contexts: dict[tuple[nodes.NodeNG, str], list[nodes.Import | nodes.ImportFrom]] = {}
|
||||
for statement in self.imports(node.values()):
|
||||
contexts.setdefault(self.import_context(statement), []).append(statement)
|
||||
|
||||
for imports in contexts.values():
|
||||
self.check_imports(imports, root_module)
|
||||
self.check_imports(imports, self.linter.config.root_module)
|
||||
|
||||
|
||||
def register(linter: PyLinter) -> None:
|
||||
|
||||
Reference in new issue
Block a user