diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2020-07-12 09:11:53 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2020-07-12 09:11:53 -0500 |
| commit | c42fd6044f15102d6688cc958a50ab134df046ba (patch) | |
| tree | 3471917b24b4f6c8f43b0005e6e2a3459fb88be5 | |
| parent | Add to __all__ (diff) | |
| download | config-file-c42fd6044f15102d6688cc958a50ab134df046ba.zip | |
Add return type hints to BaseParser
| -rw-r--r-- | config_file/parsers/base_parser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config_file/parsers/base_parser.py b/config_file/parsers/base_parser.py index a1d38d4..da6e90a 100644 --- a/config_file/parsers/base_parser.py +++ b/config_file/parsers/base_parser.py @@ -12,7 +12,7 @@ class BaseParser(ABC): """ @abstractmethod - def __init__(self, file_contents: str): + def __init__(self, file_contents: str) -> None: """ All parsers will take in the file as a string, parse them internally to their own representation that they @@ -26,7 +26,7 @@ class BaseParser(ABC): self.parsed_content = self.parse(self.content) @abstractmethod - def get(self, key: str, parse_types: bool = False, all: bool = False): + def get(self, key: str, parse_types: bool = False, all: bool = False) -> Any: """ Retrieve the value of a key in its native type. This means the string 'true' will be parsed back as the |