File: main.py

package info (click to toggle)
python-lazy-model 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 152 kB
  • sloc: python: 280; makefile: 7
file content (12 lines) | stat: -rw-r--r-- 351 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
import pydantic

major_version = int(pydantic.version.VERSION.split(".")[0])

if major_version == 1:
    from lazy_model.parser.old import LazyModel  # noqa: F401
elif major_version == 2:
    from lazy_model.parser.new import LazyModel  # noqa: F401
else:
    raise NotImplementedError(
        f"pydantic version {major_version} not supported"
    )