diff options
Diffstat (limited to 'qutebrowser/config/configtypes.py')
-rw-r--r-- | qutebrowser/config/configtypes.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py index 7b5125b1c..2c11251d3 100644 --- a/qutebrowser/config/configtypes.py +++ b/qutebrowser/config/configtypes.py @@ -1823,31 +1823,6 @@ class NewTabPosition(String): ('last', "At the end.")) -class TimestampTemplate(BaseType): - - """An strftime-like template for timestamps. - - See https://sqlite.org/lang_datefunc.html for reference. - """ - - def to_py(self, value: _StrUnset) -> _StrUnsetNone: - self._basic_py_validation(value, str) - if isinstance(value, configutils.Unset): - return value - elif not value: - return None - - try: - # Dummy check to see if the template is valid - datetime.datetime.now().strftime(value) - except ValueError as error: - # thrown on invalid template string - raise configexc.ValidationError( - value, "Invalid format string: {}".format(error)) - - return value - - class Key(BaseType): """A name of a key.""" |