Skip to content

Commit

Permalink
Tweak builtins check for PyPy
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinche committed Apr 16, 2022
1 parent 4de2fb2 commit 4f0840c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cattrs/_compat.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import builtins
import sys
from dataclasses import MISSING
from dataclasses import fields as dataclass_fields
Expand Down Expand Up @@ -35,7 +36,7 @@ def get_origin(cl):
else:
from typing import Protocol, get_args, get_origin # NOQA

if "ExceptionGroup" not in __builtins__:
if "ExceptionGroup" not in dir(builtins):
from exceptiongroup import ExceptionGroup
else:
ExceptionGroup = ExceptionGroup
Expand Down

0 comments on commit 4f0840c

Please sign in to comment.