Skip to content

Commit

Permalink
[#37] Refactor: switch to builtin FileNotFoundError
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanofusai committed Dec 6, 2024
1 parent f452f7d commit edcd933
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pyamldantic"
version = "1.1.0"
version = "1.1.1"
description = "Validate and serialize YAML config files with Pydantic, with support for environment variables."
readme = "README.md"
authors = [
Expand Down
1 change: 0 additions & 1 deletion src/pyamldantic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from yaml.scanner import ScannerError

from .exceptions import (
FileNotFoundError, # noqa: A004
InvalidYAMLError,
MissingEnvironmentVariableError,
SchemaValidationError,
Expand Down
7 changes: 0 additions & 7 deletions src/pyamldantic/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
class FileNotFoundError(Exception): # noqa: A001
"""Raised when the config file is not found."""

def __init__(self, path: str) -> None: # noqa: D107
super().__init__(f"{path} not found")


class InvalidYAMLError(Exception):
"""Raised when the config file is not a valid YAML file."""

Expand Down
1 change: 0 additions & 1 deletion tests/file_not_found_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import pytest

from src.pyamldantic import YAMLConfig
from src.pyamldantic.exceptions import FileNotFoundError # noqa: A004

from .fixtures import Schema

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit edcd933

Please sign in to comment.