From 592ea6812da05ec49a7428862309e078704bc740 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 2 Feb 2020 14:21:02 -0600 Subject: Add type hints + contents is now content in BaseParser --- config_file/parsers/base_parser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config_file/parsers/base_parser.py') diff --git a/config_file/parsers/base_parser.py b/config_file/parsers/base_parser.py index 22e286a..54756cd 100644 --- a/config_file/parsers/base_parser.py +++ b/config_file/parsers/base_parser.py @@ -21,8 +21,8 @@ class BaseParser(ABC): It is up to the caller of the parser to read in the file to the parser and save the file when they are done using stringify(). """ - self.contents = file_contents - self.parsed_content = self.parse(self.contents) + self.content = file_contents + self.parsed_content = self.parse(self.content) @abstractmethod def get(self, key, parse_type=True): @@ -37,12 +37,12 @@ class BaseParser(ABC): raise NotImplementedError @abstractmethod - def set(self, key, value): + def set(self, key, value) -> bool: """Sets the value of a key.""" raise NotImplementedError @abstractmethod - def delete(self, section_key): + def delete(self, section_key) -> bool: """Deletes a key/value pair or entire sections.""" raise NotImplementedError -- cgit v1.2.3