@@ -817,6 +817,7 @@ class SecretNullableOption(NullableOption, SecretOption):
817817 get = SecretOption .get
818818 class_description = SecretOption .class_description
819819
820+
820821class ListSecretOption (SecretOption ):
821822 # use get from SecretOption
822823 def get (self ):
@@ -828,7 +829,7 @@ def get(self):
828829 def validate (self , options ): # noqa: ARG002 -- options unused
829830 if self .name == "WEB_JWT_SECRET" :
830831 secrets = self .get ()
831- invalid_secrets = [ x for x in secrets [1 :] if len (x ) < 32 ]
832+ invalid_secrets = [x for x in secrets [1 :] if len (x ) < 32 ]
832833 if invalid_secrets :
833834 raise OptionValueError (
834835 self , ", " .join (secrets ),
@@ -837,6 +838,7 @@ def validate(self, options): # noqa: ARG002 -- options unused
837838 else :
838839 self .get ()
839840
841+
840842class RedisUrlOption (SecretNullableOption ):
841843 """Do required check to make sure known bad parameters are not
842844 put in the url.
@@ -984,12 +986,12 @@ def str2value(self, value):
984986 value = value .decode ("utf-8" )
985987 return re .compile (value , self .flags )
986988
987- class LogLevelOption (Option ):
988989
990+ class LogLevelOption (Option ):
989991 """A log level, one of none, debug, info, warning, error, critical"""
990992
991- values = "none debug info warning error critical" .split ()
992- class_description = "Allowed values: %s" % (', ' .join (values ))
993+ values = "none debug info warning error critical" .split ()
994+ class_description = "Allowed values: %s" % (', ' .join (values ))
993995
994996 def str2value (self , value ):
995997 _val = value .lower ()
@@ -998,6 +1000,7 @@ def str2value(self, value):
9981000 else :
9991001 raise OptionValueError (self , value , self .class_description )
10001002
1003+
10011004try :
10021005 import jinja2 # noqa: F401
10031006 jinja2_avail = "Available found"
0 commit comments