diff --git a/dataclass_wizard/models.py b/dataclass_wizard/models.py index 2aa60d5f..99e2f7cd 100644 --- a/dataclass_wizard/models.py +++ b/dataclass_wizard/models.py @@ -18,17 +18,11 @@ # The `type` statement is introduced in Python 3.12 # Ref: https://docs.python.org/3.12/reference/simple_stmts.html#type # -# TODO: Remove function declaration once we drop support -# for Python 3.9-3.11 -def get_catch_all(): - if PY312_OR_ABOVE: - type CatchAll = Mapping - return CatchAll - else: - return NewType('CatchAll', Mapping) - - -CatchAll = get_catch_all() +# TODO: uncomment following usage of `type` statement +# once we drop support for Python 3.9 - 3.11 +# if PY312_OR_ABOVE: +# type CatchAll = Mapping +CatchAll = NewType('CatchAll', Mapping) class Extras(PyTypedDict):