AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 13.59.36.4


Current Path : /usr/lib/python3/dist-packages/josepy/
Upload File :
Current File : //usr/lib/python3/dist-packages/josepy/magic_typing.py

"""Shim class to not have to depend on typing module in prod."""
# mypy: ignore-errors
import sys
import warnings
from typing import Any


warnings.warn("josepy.magic_typing is deprecated and will be removed in a future release.",
              DeprecationWarning)


class TypingClass:
    """Ignore import errors by getting anything"""
    def __getattr__(self, name: str) -> Any:
        return None


try:
    # mypy doesn't respect modifying sys.modules
    from typing import *  # noqa: F401,F403
except ImportError:
    sys.modules[__name__] = TypingClass()