@@ -817,6 +817,7 @@ class SecretNullableOption(NullableOption, SecretOption):
817
817
get = SecretOption .get
818
818
class_description = SecretOption .class_description
819
819
820
+
820
821
class ListSecretOption (SecretOption ):
821
822
# use get from SecretOption
822
823
def get (self ):
@@ -828,7 +829,7 @@ def get(self):
828
829
def validate (self , options ): # noqa: ARG002 -- options unused
829
830
if self .name == "WEB_JWT_SECRET" :
830
831
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 ]
832
833
if invalid_secrets :
833
834
raise OptionValueError (
834
835
self , ", " .join (secrets ),
@@ -837,6 +838,7 @@ def validate(self, options): # noqa: ARG002 -- options unused
837
838
else :
838
839
self .get ()
839
840
841
+
840
842
class RedisUrlOption (SecretNullableOption ):
841
843
"""Do required check to make sure known bad parameters are not
842
844
put in the url.
@@ -984,12 +986,12 @@ def str2value(self, value):
984
986
value = value .decode ("utf-8" )
985
987
return re .compile (value , self .flags )
986
988
987
- class LogLevelOption (Option ):
988
989
990
+ class LogLevelOption (Option ):
989
991
"""A log level, one of none, debug, info, warning, error, critical"""
990
992
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 ))
993
995
994
996
def str2value (self , value ):
995
997
_val = value .lower ()
@@ -998,6 +1000,7 @@ def str2value(self, value):
998
1000
else :
999
1001
raise OptionValueError (self , value , self .class_description )
1000
1002
1003
+
1001
1004
try :
1002
1005
import jinja2 # noqa: F401
1003
1006
jinja2_avail = "Available found"
0 commit comments