Fix a few more typing issues

This commit is contained in:
Dave Halter
2026-02-04 02:24:41 +01:00
parent 3ffed76884
commit e7fdbcc834
17 changed files with 38 additions and 23 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import re
from textwrap import dedent
from typing import Any
from inspect import Parameter
from parso.python.token import PythonTokenTypes
@@ -265,7 +266,7 @@ class Completion:
elif type_ == 'for_stmt':
allowed_transitions.append('else')
completion_names = []
completion_names: list[Any] = []
kwargs_only = False
if any(t in allowed_transitions for t in (PythonTokenTypes.NAME,
+1 -1
View File
@@ -254,7 +254,7 @@ def get_cached_default_environment():
# /path/to/env so we need to fully resolve the paths in order to
# compare them.
if var and os.path.realpath(var) != os.path.realpath(environment.path):
_get_cached_default_environment.clear_cache()
_get_cached_default_environment.clear_cache() # type: ignore[attr-defined]
return _get_cached_default_environment()
return environment