Skip to content

Commit f7dc27b

Browse files
committed
Use consistent type annotations
1 parent 7c95992 commit f7dc27b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/_pyrepl/_module_completer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __init__(self, namespace: Mapping[str, Any] | None = None) -> None:
7272
self._curr_sys_path: list[str] = sys.path[:]
7373
self._stdlib_path = os.path.dirname(importlib.__path__[0])
7474

75-
def get_completions(self, line: str) -> tuple[list[str], list[Any], CompletionAction | None] | None:
75+
def get_completions(self, line: str) -> tuple[list[str], list[object], CompletionAction | None] | None:
7676
"""Return the next possible import completions for 'line'.
7777
7878
For attributes completion, if the module to complete from is not
@@ -89,7 +89,7 @@ def get_completions(self, line: str) -> tuple[list[str], list[Any], CompletionAc
8989
# no completions are available
9090
return [], [], None
9191

92-
def complete(self, from_name: str | None, name: str | None) -> tuple[list[str], list[Any], CompletionAction | None]:
92+
def complete(self, from_name: str | None, name: str | None) -> tuple[list[str], list[object], CompletionAction | None]:
9393
if from_name is None:
9494
# import x.y.z<tab>
9595
assert name is not None
@@ -181,7 +181,7 @@ def _is_stdlib_module(self, module_info: pkgutil.ModuleInfo) -> bool:
181181
return (isinstance(module_info.module_finder, FileFinder)
182182
and module_info.module_finder.path == self._stdlib_path)
183183

184-
def find_attributes(self, path: str, prefix: str) -> tuple[list[str], list[Any], CompletionAction | None]:
184+
def find_attributes(self, path: str, prefix: str) -> tuple[list[str], list[object], CompletionAction | None]:
185185
"""Find all attributes of module 'path' that start with 'prefix'."""
186186
attributes, values, action = self._find_attributes(path, prefix)
187187
# Filter out invalid attribute names
@@ -194,7 +194,7 @@ def find_attributes(self, path: str, prefix: str) -> tuple[list[str], list[Any],
194194
filtered_values.append(val)
195195
return filtered_names, filtered_values, action
196196

197-
def _find_attributes(self, path: str, prefix: str) -> tuple[list[str], list[Any], CompletionAction | None]:
197+
def _find_attributes(self, path: str, prefix: str) -> tuple[list[str], list[object], CompletionAction | None]:
198198
path = self._resolve_relative_path(path) # type: ignore[assignment]
199199
if path is None:
200200
return [], [], None

0 commit comments

Comments
 (0)