summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Schwab <git@nicholas-schwab.de>2021-04-08 16:49:35 +0200
committerNicholas Schwab <git@nicholas-schwab.de>2021-04-08 16:51:00 +0200
commitf8a34fb7532f6e2880ee0f6f384f836b5dead1e8 (patch)
tree4417ce6a1fb9cf89ff78a2627302ed2a104961ee
parenta9f95c72aee2b3abc7b325e194b96188a6524356 (diff)
downloadqutebrowser-f8a34fb7532f6e2880ee0f6f384f836b5dead1e8.tar.gz
qutebrowser-f8a34fb7532f6e2880ee0f6f384f836b5dead1e8.zip
Add getter for valid_prefixes to config BaseType. Will be used for documentation.
-rw-r--r--qutebrowser/config/configtypes.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py
index 983e4685c..f03353526 100644
--- a/qutebrowser/config/configtypes.py
+++ b/qutebrowser/config/configtypes.py
@@ -184,6 +184,7 @@ class BaseType:
self._completions = completions
self.none_ok = none_ok
self.valid_values: Optional[ValidValues] = None
+ self.valid_prefixes: Optional[ValidPrefixes] = None
def get_name(self) -> str:
"""Get a name for the type for documentation."""
@@ -193,6 +194,10 @@ class BaseType:
"""Get the type's valid values for documentation."""
return self.valid_values
+ def get_valid_prefixes(self) -> Optional[ValidPrefixes]:
+ """Get the type's valid prefixes for documentation."""
+ return self.valid_prefixes
+
def _basic_py_validation(
self, value: Any,
pytype: Union[type, Tuple[type, ...]]) -> None: