Skip to content

Commit

Permalink
Merge branch 'dev/3.0' of https://github.com/PythonistaGuild/TwitchIO
Browse files Browse the repository at this point in the history
…into dev/3.0
  • Loading branch information
chillymosh committed Nov 18, 2024
2 parents 9d56cef + b1db109 commit 7d5b779
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion twitchio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
_from_json = json.loads


PY_312 = sys.version_info >= (3, 12)


__all__ = (
"_from_json",
"setup_logging",
Expand Down Expand Up @@ -914,7 +917,7 @@ def evaluate_annotation(
cache[tp] = evaluated
return evaluated

if getattr(tp.__repr__, "__objclass__", None) is typing.TypeAliasType: # type: ignore
if PY_312 and getattr(tp.__repr__, "__objclass__", None) is typing.TypeAliasType: # type: ignore
temp_locals = dict(**locals, **{t.__name__: t for t in tp.__type_params__}) # type: ignore
annotation = evaluate_annotation(tp.__value__, globals, temp_locals, cache.copy()) # type: ignore
if hasattr(tp, "__args__"):
Expand Down

0 comments on commit 7d5b779

Please sign in to comment.