Skip to content

Commit dd98acd

Browse files
committed
refactor: Remove deprecated parameters from loader's resolve_aliases method
1 parent e4be30a commit dd98acd

1 file changed

Lines changed: 2 additions & 30 deletions

File tree

src/griffe/loader.py

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from contextlib import suppress
1717
from datetime import datetime, timezone
1818
from typing import TYPE_CHECKING, Any, ClassVar, Sequence, cast
19-
from warnings import warn
2019

2120
from griffe.agents.inspector import inspect
2221
from griffe.agents.visitor import patch_ast, visit
@@ -133,47 +132,20 @@ def load_module(
133132
def resolve_aliases(
134133
self,
135134
*,
136-
implicit: bool | None = None,
137-
external: bool | None = None,
135+
implicit: bool = False,
136+
external: bool = False,
138137
max_iterations: int | None = None,
139-
only_exported: bool | None = None,
140-
only_known_modules: bool | None = None,
141138
) -> tuple[set[str], int]:
142139
"""Resolve aliases.
143140
144141
Parameters:
145142
implicit: When false, only try to resolve an alias if it is explicitely exported.
146143
external: When false, don't try to load unspecified modules to resolve aliases.
147144
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).
150145
151146
Returns:
152147
The unresolved aliases and the number of iterations done.
153148
"""
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-
177149
if max_iterations is None:
178150
max_iterations = float("inf") # type: ignore[assignment]
179151
prev_unresolved: set[str] = set()

0 commit comments

Comments
 (0)