Fix a few flake8 issues

This commit is contained in:
Dave Halter
2025-06-16 16:41:36 +02:00
parent 13063221f2
commit 7c27da8d68
2 changed files with 4 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ def clear_time_caches(delete_all: bool = False) -> None:
:param delete_all: Deletes also the cache that is normally not deleted, :param delete_all: Deletes also the cache that is normally not deleted,
like parser cache, which is important for faster parsing. like parser cache, which is important for faster parsing.
""" """
global _time_caches global _time_caches # noqa: F824
if delete_all: if delete_all:
for cache in _time_caches.values(): for cache in _time_caches.values():

View File

@@ -16,13 +16,13 @@ def test_on_code():
assert i.infer() assert i.infer()
def test_generics_without_definition(): def test_generics_without_definition() -> None:
# Used to raise a recursion error # Used to raise a recursion error
T = TypeVar('T') T = TypeVar('T')
class Stack(Generic[T]): class Stack(Generic[T]):
def __init__(self): def __init__(self) -> None:
self.items = [] # type: List[T] self.items: List[T] = []
def push(self, item): def push(self, item):
self.items.append(item) self.items.append(item)