Skip to content

Commit

Permalink
Updated type annotation to fix GitHub autotesting error
Browse files Browse the repository at this point in the history
  • Loading branch information
sushimon committed Jul 21, 2023
1 parent 6bbabe0 commit 2336229
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python_ta/checkers/invalid_name_checker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""A checker used for identifying names that don't conform to Python naming conventions."""

import re
from typing import List
from typing import List, Optional

from astroid import nodes
from pylint.checkers import BaseChecker, utils
Expand Down Expand Up @@ -480,7 +480,7 @@ def _check_name(self, node_type: str, name: str, node: nodes.NodeNG) -> None:
args = (node_type, name, msg)
self.add_message("pep8-name-violation", node=node, args=args)

def _recursive_check_names(self, args: list[nodes.AssignName]) -> None:
def _recursive_check_names(self, args: List[nodes.AssignName]) -> None:
"""Check names in a possibly recursive list <arg>.
Taken from pylint.checkers.base.name_checker.checker.
Expand All @@ -492,7 +492,7 @@ def _recursive_check_names(self, args: list[nodes.AssignName]) -> None:
self._check_name("argument", arg.name, arg)

@staticmethod
def _assigns_typevar(node: nodes.NodeNG | None) -> bool:
def _assigns_typevar(node: Optional[nodes.NodeNG]) -> bool:
"""Check if a node is assigning a TypeVar.
Taken from pylint.checkers.base.name_checker.checker."""
Expand All @@ -503,7 +503,7 @@ def _assigns_typevar(node: nodes.NodeNG | None) -> bool:
return False

@staticmethod
def _assigns_typealias(node: nodes.NodeNG | None) -> bool:
def _assigns_typealias(node: Optional[nodes.NodeNG]) -> bool:
"""Check if a node is assigning a TypeAlias.
Taken from pylint.checkers.base.name_checker.checker."""
Expand Down

0 comments on commit 2336229

Please sign in to comment.