Skip to content

Commit

Permalink
Spell these ignore codes correctly
Browse files Browse the repository at this point in the history
I'm guessing these relate to older versions of mypy which didn't
know how to read the code, however it seems reasonable to assume
a newer enough version of mypy now.
  • Loading branch information
PeterJCLaw committed Sep 24, 2022
1 parent 68f55eb commit ac2b434
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routemaster/exit_conditions/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class _TokenSource(object):
def __init__(self, iterable: Iterator[Token]) -> None:
self.iterable = iterable
self.previous_location = None
self.head: Token = object() # type: ignore # [assignment]
self.head: Token = object() # type: ignore[assignment]
self._advance()

def _advance(self) -> None:
Expand All @@ -36,7 +36,7 @@ def _advance(self) -> None:
self.previous_location = getattr(self.head, 'location', None)
self.head = next(self.iterable)
except StopIteration:
self.head = None # type: ignore # [assignment]
self.head = None # type: ignore[assignment]

def try_eat_next(self, *kinds: TokenKind) -> bool:
if not self.match_next(*kinds):
Expand Down

0 comments on commit ac2b434

Please sign in to comment.