diff --git a/.flake8 b/.flake8 index 0e916b2..ff40897 100644 --- a/.flake8 +++ b/.flake8 @@ -25,6 +25,7 @@ max-line-length = 120 exclude = __init__.py + docs/conf.py .git, .tox, diff --git a/setup.py b/setup.py index d0cccf4..f1d608f 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def load_req() -> typing.List[str]: print(f'Version: {__version__}') print('') -# When we run tox tests we don't have these files available so we skip them +# When we run tox tests we don't have these files available, so we skip them readme = Path(__file__).with_name('readme.md') long_description = '' if readme.is_file(): diff --git a/src/easyconfig/create_app_config.py b/src/easyconfig/create_app_config.py index b820455..abc554f 100644 --- a/src/easyconfig/create_app_config.py +++ b/src/easyconfig/create_app_config.py @@ -50,7 +50,7 @@ def get_file_values( # dict -> build models if isinstance(file_values, dict): - file_values = model.__class__.parse_obj(file_values) + file_values = model.model_validate(file_values) if file_values is not None and not isinstance(file_values, BaseModel): msg = f'Default must be None or an instance of {BaseModel.__class__.__name__}! Got {type(file_values)}' diff --git a/tests/test_app_creation.py b/tests/test_app_creation.py index d810fca..715a1f3 100644 --- a/tests/test_app_creation.py +++ b/tests/test_app_creation.py @@ -1,4 +1,4 @@ -# ruff: noqa: RUF012, INP001 +# ruff: noqa: RUF012 from enum import Enum from typing import List diff --git a/tests/yaml/test_align.py b/tests/yaml/test_align.py index 787658d..85c04e0 100644 --- a/tests/yaml/test_align.py +++ b/tests/yaml/test_align.py @@ -10,7 +10,7 @@ def my_map(): top = CommentedMap() top['sub_key1'] = data = CommentedMap() - # this is currently not supported but we should not crash if a user does this + # this is currently not supported, but we should not crash if a user does this top.yaml_set_comment_before_after_key('sub_key1', before='my description') data['a'] = 1