Skip to content

Commit 6f94687

Browse files
committed
Ensure type checking passes
1 parent ebe1e1d commit 6f94687

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/trio/_deprecate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class DeprecatedAttribute:
151151

152152
def deprecate_attributes(
153153
module_name: str, deprecated_attributes: dict[str, DeprecatedAttribute]
154-
) -> Callable[[str], object]:
154+
) -> None:
155155
def __getattr__(name: str) -> object:
156156
if name in deprecated_attributes:
157157
info = deprecated_attributes[name]
@@ -165,4 +165,4 @@ def __getattr__(name: str) -> object:
165165
msg = "module '{}' has no attribute '{}'"
166166
raise AttributeError(msg.format(module_name, name))
167167

168-
sys.modules[module_name].__getattr__ = __getattr__
168+
sys.modules[module_name].__getattr__ = __getattr__ # type: ignore[method-assign]

0 commit comments

Comments
 (0)