From 7c27da8d6829599de3e9a1437dae7138f1078c4f Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Mon, 16 Jun 2025 16:41:36 +0200 Subject: [PATCH] Fix a few flake8 issues --- jedi/cache.py | 2 +- test/test_inference/test_mixed.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jedi/cache.py b/jedi/cache.py index 1ff45201..2bb15105 100644 --- a/jedi/cache.py +++ b/jedi/cache.py @@ -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, like parser cache, which is important for faster parsing. """ - global _time_caches + global _time_caches # noqa: F824 if delete_all: for cache in _time_caches.values(): diff --git a/test/test_inference/test_mixed.py b/test/test_inference/test_mixed.py index b4e6c65d..1bbe64bd 100644 --- a/test/test_inference/test_mixed.py +++ b/test/test_inference/test_mixed.py @@ -16,13 +16,13 @@ def test_on_code(): assert i.infer() -def test_generics_without_definition(): +def test_generics_without_definition() -> None: # Used to raise a recursion error T = TypeVar('T') class Stack(Generic[T]): - def __init__(self): - self.items = [] # type: List[T] + def __init__(self) -> None: + self.items: List[T] = [] def push(self, item): self.items.append(item)