Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Introduce @override from Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinclert committed Sep 13, 2023
1 parent 5c4acc0 commit 5820cc5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api/config/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from abc import ABC
from abc import abstractmethod
from typing import Any
from typing import override


class ConfigLoader(ABC):
Expand Down Expand Up @@ -50,6 +51,7 @@ def _parse_value(data_type: type, name: str, default: Any) -> Any:
value = data_type(value)
return value

@override
def load_argument(self, data_type: type, name: str, default: Any) -> Any:
"""
Loads a single argument from the OS env.
Expand All @@ -61,6 +63,7 @@ def load_argument(self, data_type: type, name: str, default: Any) -> Any:

return self._parse_value(data_type, name, default)

@override
def load_arguments(self, args: dict | tuple) -> dict:
"""
Recursive function to load multiple arguments from the OS env.
Expand Down

0 comments on commit 5820cc5

Please sign in to comment.