Skip to content

Commit

Permalink
refactor: Remove useless attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Apr 15, 2022
1 parent 246fb06 commit c4a92b7
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/griffe/agents/visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ def __init__(
self.extensions: Extensions = extensions.attach_visitor(self)
self.parent: Module | None = parent
self.current: Module | Class = None # type: ignore[assignment]
self.in_decorator: bool = False
self.docstring_parser: Parser | None = docstring_parser
self.docstring_options: dict[str, Any] = docstring_options or {}
self.lines_collection: LinesCollection = lines_collection or LinesCollection()
Expand Down Expand Up @@ -210,11 +209,9 @@ def visit_classdef(self, node: ast.ClassDef) -> None:
decorators = []
if node.decorator_list:
lineno = node.decorator_list[0].lineno
self.in_decorator = True
for decorator_node in node.decorator_list:
decorators.append(Decorator(decorator_node.lineno, decorator_node.end_lineno)) # type: ignore[attr-defined]
self.visit(decorator_node)
self.in_decorator = False
else:
lineno = node.lineno

Expand Down Expand Up @@ -251,11 +248,9 @@ def handle_function(self, node: ast.AsyncFunctionDef | ast.FunctionDef, labels:
decorators = []
if node.decorator_list:
lineno = node.decorator_list[0].lineno
self.in_decorator = True
for decorator_node in node.decorator_list:
decorators.append(Decorator(decorator_node.lineno, decorator_node.end_lineno)) # type: ignore[attr-defined]
self.visit(decorator_node)
self.in_decorator = False
else:
lineno = node.lineno

Expand Down

0 comments on commit c4a92b7

Please sign in to comment.