Mercurial > p > roundup > code
changeset 7844:b95474b23440
chore(lint): whitespace fixes, double space between class stanzas
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 30 Mar 2024 21:40:02 -0400 |
| parents | 3f2d743824e9 |
| children | 0c71ac9cdcd0 |
| files | roundup/configuration.py |
| diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/configuration.py Thu Mar 28 16:24:14 2024 -0400 +++ b/roundup/configuration.py Sat Mar 30 21:40:02 2024 -0400 @@ -817,6 +817,7 @@ get = SecretOption.get class_description = SecretOption.class_description + class ListSecretOption(SecretOption): # use get from SecretOption def get(self): @@ -828,7 +829,7 @@ def validate(self, options): # noqa: ARG002 -- options unused if self.name == "WEB_JWT_SECRET": secrets = self.get() - invalid_secrets = [ x for x in secrets[1:] if len(x) < 32] + invalid_secrets = [x for x in secrets[1:] if len(x) < 32] if invalid_secrets: raise OptionValueError( self, ", ".join(secrets), @@ -837,6 +838,7 @@ else: self.get() + class RedisUrlOption(SecretNullableOption): """Do required check to make sure known bad parameters are not put in the url. @@ -984,12 +986,12 @@ value = value.decode("utf-8") return re.compile(value, self.flags) + class LogLevelOption(Option): - """A log level, one of none, debug, info, warning, error, critical""" - values = "none debug info warning error critical".split () - class_description = "Allowed values: %s" % (', '.join (values)) + values = "none debug info warning error critical".split() + class_description = "Allowed values: %s" % (', '.join(values)) def str2value(self, value): _val = value.lower() @@ -998,6 +1000,7 @@ else: raise OptionValueError(self, value, self.class_description) + try: import jinja2 # noqa: F401 jinja2_avail = "Available found"
