Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SettingsErrors when file can't be used as source #432

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Nov 7, 2024

  1. Test raised ValueError on invalid settings file

    Julian Vanden Broeck committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    e75711a View commit details
    Browse the repository at this point in the history
  2. Use SettingsErrors for invalid file source

    Some file formats (at least yaml) allow to represent non dictionnary
    values. In such situation we can't add the values read from those files.
    Instead of raising a ValueError, we now raise a SettingsError and
    indicate we can't parse the related config file.
    Julian Vanden Broeck committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    0225b19 View commit details
    Browse the repository at this point in the history
  3. Raise error if settings from file is not a dict

    We verify the loaded settings from files is dict, otherwise we raise a
    SettingsError. With that change, we make Pydantic fails a bit faster.
    Julian Vanden Broeck committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    c6e6fb9 View commit details
    Browse the repository at this point in the history