Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 29, 2024
1 parent c589342 commit 7cd927b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion src/model_metadata/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def load_component(module_name: str, class_name: str) -> type[Any]:


@contextlib.contextmanager
def as_cwd(path: str, create: bool = True) -> Generator[None, None, None]:
def as_cwd(path: str, create: bool = True) -> Generator[None]:
prev_cwd = os.getcwd()

if create:
Expand Down
5 changes: 0 additions & 5 deletions src/model_metadata/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@


class ModelMetadataError(Exception):

"""Base error for model_metadata package."""

pass


class MetadataNotFoundError(ModelMetadataError):

"""Raise if metadata cannot be found."""

def __init__(self, path_to_metadata: str):
Expand All @@ -21,7 +19,6 @@ def __str__(self) -> str:


class MissingSectionError(ModelMetadataError):

"""Raise if a section in not found in the metadata."""

def __init__(self, name: str):
Expand All @@ -36,7 +33,6 @@ def __str__(self) -> str:


class MissingValueError(ModelMetadataError):

"""Raise if a value is not found in a metadata section."""

def __init__(self, name: str):
Expand All @@ -51,7 +47,6 @@ def __str__(self) -> str:


class BadEntryPointError(ModelMetadataError):

"""Raise if an entry-point string is bad, in some way."""

def __init__(self, entry_point: str, msg: str | None = None):
Expand Down
1 change: 0 additions & 1 deletion src/model_metadata/model_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def object_properties(obj: ModelInfo) -> tuple[tuple[str, Any], ...]:


class ModelInfo:

"""Information about a model."""

def __init__(
Expand Down

0 comments on commit 7cd927b

Please sign in to comment.