Skip to content

Commit

Permalink
Implement @leycec's suggested workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
jennydaman committed Jul 25, 2024
1 parent 85152a1 commit 34716e1
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/aiochris/link/linked.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,6 @@ def _is_s_session_field(s: dataclasses.Field) -> bool:

def _beartype_workaround410(t):
"""
Workaround for
- https://github.com/beartype/beartype/issues/410
- https://github.com/yukinarit/pyserde/issues/575
See https://github.com/beartype/beartype/issues/410#issuecomment-2249195428
"""
if "__name_beartype__" not in dir(t) or "__scope_name_beartype__" not in dir(t):
return t
module = importlib.import_module(t.__scope_name_beartype__)
return module.__dict__[t.__name_beartype__]
return getattr(t, '__type_beartype__', None) or t

0 comments on commit 34716e1

Please sign in to comment.