diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2020-08-05 21:27:26 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2020-08-05 21:27:26 -0500 |
| commit | 1fdde7b696674546220b85bb3ffd2994e93fec3a (patch) | |
| tree | 6d2834bcf252e131deb839ccbcc243d805b99cb7 /config_file/abstract_parser.py | |
| parent | Remove AbstractParser from __init__ (diff) | |
| download | config-file-1fdde7b696674546220b85bb3ffd2994e93fec3a.zip | |
Add `wild` to AbstractParser
Diffstat (limited to 'config_file/abstract_parser.py')
| -rw-r--r-- | config_file/abstract_parser.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config_file/abstract_parser.py b/config_file/abstract_parser.py index ed9430b..ab5d205 100644 --- a/config_file/abstract_parser.py +++ b/config_file/abstract_parser.py @@ -100,7 +100,7 @@ class AbstractParser(ABC): raise NotImplementedError @abstractmethod - def has(self, key: str) -> bool: + def has(self, key: str, wild: bool = False) -> bool: """Check whether the given key is in the parsed working file. This should not behave like a wild card, as in check @@ -110,6 +110,7 @@ class AbstractParser(ABC): Args: key: The key to search for. + wild: Optionally search for any occurrence of key in the file. Returns: True if the working file has the key. False otherwise. |