Skip to content

Commit 22016b2

Browse files
committed
Remove internal pending_deprecate decorator
Was too complex for linters to pick up on and was preventing warnings from showing correctly
1 parent a40049c commit 22016b2

File tree

2 files changed

+62
-68
lines changed

2 files changed

+62
-68
lines changed

tcod/_internal.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from collections.abc import Callable
99
from typing import TYPE_CHECKING, Any, AnyStr, Literal, NoReturn, SupportsInt, TypeVar
1010

11-
from typing_extensions import LiteralString, deprecated
11+
from typing_extensions import deprecated
1212

1313
from tcod.cffi import ffi, lib
1414

@@ -40,16 +40,6 @@ def decorator(func: F) -> F:
4040
deprecate = deprecated if __debug__ or TYPE_CHECKING else _deprecate_passthrough
4141

4242

43-
def pending_deprecate(
44-
message: LiteralString = "This function may be deprecated in the future."
45-
" Consider raising an issue on GitHub if you need this feature.",
46-
category: type[Warning] = PendingDeprecationWarning,
47-
stacklevel: int = 0,
48-
) -> Callable[[F], F]:
49-
"""Like deprecate, but the default parameters are filled out for a generic pending deprecation warning."""
50-
return deprecate(message, category=category, stacklevel=stacklevel)
51-
52-
5343
def verify_order(order: Literal["C", "F"]) -> Literal["C", "F"]:
5444
"""Verify and return a Numpy order string."""
5545
order = order.upper() # type: ignore[assignment]

0 commit comments

Comments
 (0)