diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2020-02-09 20:47:13 -0600 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2020-02-09 20:47:13 -0600 |
| commit | 74048486b37cda4dc9a252ed1415b6e136f65186 (patch) | |
| tree | 705815f5dbb7f89cb1435e748b6407beac299dcc /config_file/parsers/base_parser.py | |
| parent | Merge branch 'master' of github.com:eugenetriguba/config_file (diff) | |
| download | config-file-74048486b37cda4dc9a252ed1415b6e136f65186.zip | |
Add default + return_type param to get(), turn off automatic parsing
Diffstat (limited to 'config_file/parsers/base_parser.py')
| -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 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 |