diff options
| author | 2025-11-09 23:22:54 +0000 | |
|---|---|---|
| committer | 2025-11-09 23:22:54 +0000 | |
| commit | fe369f9cb90a6a213af04004710fff4cd46aca72 (patch) | |
| tree | 824d9fe6f1b9efc570f29c9b2f34ace2d9a3a5c3 | |
| parent | Update ruff version (diff) | |
Updates for new Ruff version12.x
| -rw-r--r-- | pydis_core/utils/function.py | 4 | ||||
| -rw-r--r-- | pydis_core/utils/logging.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pydis_core/utils/function.py b/pydis_core/utils/function.py index 5c0d7ba4..2d2b7923 100644 --- a/pydis_core/utils/function.py +++ b/pydis_core/utils/function.py @@ -138,8 +138,8 @@ def update_wrapper_globals( If ``wrapper`` and ``wrapped`` share a global name that's also used in ``wrapped``\'s typehints, and is not in ``ignored_conflict_names``. """ - wrapped = typing.cast(types.FunctionType, wrapped) - wrapper = typing.cast(types.FunctionType, wrapper) + wrapped = typing.cast("types.FunctionType", wrapped) + wrapper = typing.cast("types.FunctionType", wrapper) annotation_global_names = ( ann.split(".", maxsplit=1)[0] for ann in wrapped.__annotations__.values() if isinstance(ann, str) diff --git a/pydis_core/utils/logging.py b/pydis_core/utils/logging.py index 256151a8..9e9e5d12 100644 --- a/pydis_core/utils/logging.py +++ b/pydis_core/utils/logging.py @@ -48,7 +48,7 @@ def get_logger(name: str | None = None) -> CustomLogger: Returns: An instance of the :obj:`CustomLogger` class. """ - return typing.cast(CustomLogger, logging.getLogger(name)) + return typing.cast("CustomLogger", logging.getLogger(name)) # Setup trace level logging so that we can use it within pydis_core. |