Skip to content

Commit

Permalink
Get rid of PyiAwareFlakesChecker.deferHandleNode (#373)
Browse files Browse the repository at this point in the history
Following #364, this method is now only called in one location in our
code (and it doesn't exist on the superclass). We can just inline it.

Refs #183
  • Loading branch information
AlexWaygood authored May 3, 2023
1 parent 8bd3233 commit cb05781
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,6 @@ def annotationsFutureEnabled(self, value: bool):
"""Does nothing, as we always want this property to be `True`."""
pass

def deferHandleNode(self, node: ast.AST | None, parent) -> None:
self.deferFunction(lambda: self.handleNode(node, parent))

def ASSIGN(
self, tree: ast.Assign, omit: str | tuple[str, ...] | None = None
) -> None:
Expand All @@ -214,7 +211,7 @@ def ASSIGN(
for target in tree.targets:
self.handleNode(target, tree)

self.deferHandleNode(tree.value, tree)
self.deferFunction(lambda: self.handleNode(tree.value, tree))

def handleNodeDelete(self, node: ast.AST) -> None:
"""Null implementation.
Expand Down

0 comments on commit cb05781

Please sign in to comment.