From fcd55894d9cb7213e0549d911f239f38b6e5589a Mon Sep 17 00:00:00 2001 From: pyob-bot Date: Fri, 12 Jun 2026 03:43:04 +0000 Subject: [PATCH] Refactor: Add type hints to PythonStructureVisitor --- src/pyob/pyob_code_parser.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pyob/pyob_code_parser.py b/src/pyob/pyob_code_parser.py index 2573278..f257db1 100644 --- a/src/pyob/pyob_code_parser.py +++ b/src/pyob/pyob_code_parser.py @@ -24,12 +24,12 @@ def _parse_python(self, code: str) -> str: tree = ast.parse(code) class PythonStructureVisitor(ast.NodeVisitor): - def __init__(self): - self.imports = [] - self.classes = [] - self.functions = [] - self.consts = [] - self.current_class = None + def __init__(self) -> None: + self.imports: list[str] = [] + self.classes: list[str] = [] + self.functions: list[str] = [] + self.consts: list[str] = [] + self.current_class: str | None = None def visit_Import(self, node: ast.Import) -> None: try: