diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8fb850d..3e442ef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,4 +39,4 @@ repos: hooks: - id: mypy name: MyPy - additional_dependencies: [types-all, pydantic~=1.10] + additional_dependencies: [types-PyYAML, pydantic>=2] diff --git a/tasks.py b/tasks.py index 6a73468..c499713 100644 --- a/tasks.py +++ b/tasks.py @@ -23,7 +23,7 @@ def regenerate_models(_): for schema in schemas: print(schema) schema_path = Path(schema) - gen = pd.PydanticGenerator(schema, pydantic_version="2", verbose=True) + gen = pd.PydanticGenerator(schema, verbose=True) output = gen.serialize() with open(MODEL_DIRECTORY / f"{schema_path.name.strip('.yaml')}.py", "w") as f: f.writelines(output)