|
16 | 16 | from contextlib import suppress |
17 | 17 | from datetime import datetime, timezone |
18 | 18 | from typing import TYPE_CHECKING, Any, ClassVar, Sequence, cast |
19 | | -from warnings import warn |
20 | 19 |
|
21 | 20 | from griffe.agents.inspector import inspect |
22 | 21 | from griffe.agents.visitor import patch_ast, visit |
@@ -133,47 +132,20 @@ def load_module( |
133 | 132 | def resolve_aliases( |
134 | 133 | self, |
135 | 134 | *, |
136 | | - implicit: bool | None = None, |
137 | | - external: bool | None = None, |
| 135 | + implicit: bool = False, |
| 136 | + external: bool = False, |
138 | 137 | max_iterations: int | None = None, |
139 | | - only_exported: bool | None = None, |
140 | | - only_known_modules: bool | None = None, |
141 | 138 | ) -> tuple[set[str], int]: |
142 | 139 | """Resolve aliases. |
143 | 140 |
|
144 | 141 | Parameters: |
145 | 142 | implicit: When false, only try to resolve an alias if it is explicitely exported. |
146 | 143 | external: When false, don't try to load unspecified modules to resolve aliases. |
147 | 144 | max_iterations: Maximum number of iterations on the loader modules collection. |
148 | | - only_exported: Deprecated. Use the `implicit` parameter instead (inverting the value). |
149 | | - only_known_modules: Deprecated. Use the `external` parameter instead (inverting the value). |
150 | 145 |
|
151 | 146 | Returns: |
152 | 147 | The unresolved aliases and the number of iterations done. |
153 | 148 | """ |
154 | | - # TODO: remove deprecated params at some point |
155 | | - if only_exported is not None and implicit is None: |
156 | | - warn( |
157 | | - "Parameter `only_exported` is deprecated, use `implicit` instead.", |
158 | | - DeprecationWarning, |
159 | | - stacklevel=2, |
160 | | - ) |
161 | | - implicit = not only_exported |
162 | | - |
163 | | - if only_known_modules is not None and external is None: |
164 | | - warn( |
165 | | - "Parameter `only_known_modules` is deprecated, use `external` instead.", |
166 | | - DeprecationWarning, |
167 | | - stacklevel=2, |
168 | | - ) |
169 | | - external = not only_known_modules |
170 | | - |
171 | | - # TODO: set as param defaults once deprecated params are dropped |
172 | | - if implicit is None: |
173 | | - implicit = False |
174 | | - if external is None: |
175 | | - external = False |
176 | | - |
177 | 149 | if max_iterations is None: |
178 | 150 | max_iterations = float("inf") # type: ignore[assignment] |
179 | 151 | prev_unresolved: set[str] = set() |
|
0 commit comments