Skip to content

Commit fe369f9

Browse files
committed
Updates for new Ruff version
1 parent 9439a35 commit fe369f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pydis_core/utils/function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ def update_wrapper_globals(
138138
If ``wrapper`` and ``wrapped`` share a global name that's also used in ``wrapped``\'s typehints,
139139
and is not in ``ignored_conflict_names``.
140140
"""
141-
wrapped = typing.cast(types.FunctionType, wrapped)
142-
wrapper = typing.cast(types.FunctionType, wrapper)
141+
wrapped = typing.cast("types.FunctionType", wrapped)
142+
wrapper = typing.cast("types.FunctionType", wrapper)
143143

144144
annotation_global_names = (
145145
ann.split(".", maxsplit=1)[0] for ann in wrapped.__annotations__.values() if isinstance(ann, str)

pydis_core/utils/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def get_logger(name: str | None = None) -> CustomLogger:
4848
Returns:
4949
An instance of the :obj:`CustomLogger` class.
5050
"""
51-
return typing.cast(CustomLogger, logging.getLogger(name))
51+
return typing.cast("CustomLogger", logging.getLogger(name))
5252

5353

5454
# Setup trace level logging so that we can use it within pydis_core.

0 commit comments

Comments
 (0)