From 74048486b37cda4dc9a252ed1415b6e136f65186 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 9 Feb 2020 20:47:13 -0600 Subject: Add default + return_type param to get(), turn off automatic parsing --- config_file/parsers/base_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 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 54756cd..42f93b1 100644 --- a/config_file/parsers/base_parser.py +++ b/config_file/parsers/base_parser.py @@ -25,13 +25,13 @@ class BaseParser(ABC): self.parsed_content = self.parse(self.content) @abstractmethod - def get(self, key, parse_type=True): + def get(self, key, parse_types=False): """ Retrieve the value of a key in its native type. This means the string 'true' will be parsed back as the boolean True. - If parse_type is set to False, all values will be returned + If parse_types is set to False, all values will be returned back as strings. """ raise NotImplementedError -- cgit v1.2.3