mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-10 07:41:51 +08:00
Fix a few flake8 issues
This commit is contained in:
@@ -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():
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user