Skip to content

Commit

Permalink
fix(ruff): Made ruff happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
acederberg committed Jul 18, 2024
1 parent ab818a3 commit e846e6b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/extra/whatever.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
whatever:
the: heck
should: be
here: null
here: dude

9 changes: 5 additions & 4 deletions tests/test_extra.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from os import path
from __future__ import annotations

from pathlib import Path

from yaml_settings_pydantic import (
Expand All @@ -10,13 +11,13 @@
WHATEVER = Path(__file__).parent / "extra" / "whatever.yaml"


def test_yaml_files_dict_string_keys():
def test_yaml_files_dict_string_keys() -> None:
"""For now, make sure that this does not fail."""

class Settings(BaseYamlSettings):
the: str
should: str
here: str | None
here: str

model_config = YamlSettingsConfigDict(
yaml_files={
Expand All @@ -30,4 +31,4 @@ class Settings(BaseYamlSettings):
settings = Settings.model_validate({})
assert settings.the == "heck"
assert settings.should == "be"
assert settings.here is None
assert settings.here == "dude"
3 changes: 1 addition & 2 deletions yaml_settings_pydantic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
from jsonpath_ng import parse
from pydantic.fields import FieldInfo
from pydantic.v1.utils import deep_update
from pydantic_settings import (BaseSettings, PydanticBaseSettingsSource,
SettingsConfigDict)
from pydantic_settings import BaseSettings, PydanticBaseSettingsSource, SettingsConfigDict
from typing_extensions import Doc, NotRequired, TypedDict
from yaml import safe_load

Expand Down

0 comments on commit e846e6b

Please sign in to comment.