|
52 | 52 | _SINGLETONS = ("None", "True", "False", "Ellipsis") |
53 | 53 |
|
54 | 54 |
|
55 | | -class Deque(collections.deque): |
| 55 | +class Deque(collections.deque[Any]): |
56 | 56 | """ |
57 | 57 | A subclass of deque that mimics ``pockets.iterators.modify_iter``. |
58 | 58 |
|
@@ -195,7 +195,7 @@ def __init__( |
195 | 195 | if not hasattr(self, '_directive_sections'): |
196 | 196 | self._directive_sections: list[str] = [] |
197 | 197 | if not hasattr(self, '_sections'): |
198 | | - self._sections: dict[str, Callable] = { |
| 198 | + self._sections: dict[str, Callable[..., list[str]]] = { |
199 | 199 | 'args': self._parse_parameters_section, |
200 | 200 | 'arguments': self._parse_parameters_section, |
201 | 201 | 'attention': partial(self._parse_admonition, 'attention'), |
@@ -1023,7 +1023,7 @@ def is_numeric(token: str) -> bool: |
1023 | 1023 |
|
1024 | 1024 |
|
1025 | 1025 | def _convert_numpy_type_spec( |
1026 | | - _type: str, location: str | None = None, translations: dict | None = None, |
| 1026 | + _type: str, location: str | None = None, translations: dict[str, str] | None = None, |
1027 | 1027 | ) -> str: |
1028 | 1028 | if translations is None: |
1029 | 1029 | translations = {} |
|
0 commit comments