@@ -60,7 +60,8 @@ class CustomStrengthOptionsServerConfig:
6060 def __init__ (self , data ):
6161 if not isinstance (data , dict ):
6262 raise ValueError (
63- 'Invalid data argument in CustomStrengthOptionsServerConfig constructor: {0}' .format (data ))
63+ 'Invalid data argument in CustomStrengthOptionsServerConfig'
64+ ' constructor: {0}' .format (data ))
6465 self ._data = data
6566
6667 @property
@@ -100,13 +101,13 @@ class CustomStrengthOptionsConfig:
100101 """Represents the strength attributes for the password policy"""
101102
102103 def __init__ (
103- self ,
104- min_length : int = 6 ,
105- max_length : int = 4096 ,
106- require_uppercase : bool = False ,
107- require_lowercase : bool = False ,
108- require_non_alphanumeric : bool = False ,
109- require_numeric : bool = False ,
104+ self ,
105+ min_length : int = 6 ,
106+ max_length : int = 4096 ,
107+ require_uppercase : bool = False ,
108+ require_lowercase : bool = False ,
109+ require_non_alphanumeric : bool = False ,
110+ require_numeric : bool = False ,
110111 ):
111112 self .min_length : int = min_length
112113 self .max_length : int = max_length
@@ -139,14 +140,16 @@ def validate(self):
139140 Raises:
140141 ValueError: In case of an unsuccessful validation.
141142 """
142- validate_keys (keys = vars (self ).keys (),
143- valid_keys = {
144- 'require_numeric' ,
145- 'require_uppercase' ,
146- 'require_lowercase' ,
147- 'require_non_alphanumeric' ,
148- 'min_length' ,
149- 'max_length' },
143+ validate_keys (
144+ keys = vars (self ).keys (),
145+ valid_keys = {
146+ 'require_numeric' ,
147+ 'require_uppercase' ,
148+ 'require_lowercase' ,
149+ 'require_non_alphanumeric' ,
150+ 'min_length' ,
151+ 'max_length'
152+ },
150153 config_name = 'CustomStrengthOptionsConfig' )
151154 if not isinstance (self .require_lowercase , bool ):
152155 raise ValueError ('constraints.require_lowercase must be a boolean' )
@@ -182,10 +185,10 @@ class EnforcementState(Enum):
182185 OFF = 'OFF'
183186
184187 def __init__ (
185- self ,
186- enforcement_state : EnforcementState = None ,
187- force_upgrade_on_signin : bool = False ,
188- constraints : CustomStrengthOptionsConfig = None ,
188+ self ,
189+ enforcement_state : EnforcementState = None ,
190+ force_upgrade_on_signin : bool = False ,
191+ constraints : CustomStrengthOptionsConfig = None ,
189192 ):
190193 self .enforcement_state : self .EnforcementState = enforcement_state
191194 self .force_upgrade_on_signin : bool = force_upgrade_on_signin
@@ -219,7 +222,8 @@ def validate(self):
219222 'password_policy_config.enforcement_state must be defined.' )
220223 if not isinstance (self .enforcement_state , PasswordPolicyConfig .EnforcementState ):
221224 raise ValueError (
222- 'password_policy_config.enforcement_state must be of type PasswordPolicyConfig.EnforcementState' )
225+ 'password_policy_config.enforcement_state must be of type'
226+ ' PasswordPolicyConfig.EnforcementState' )
223227 if not isinstance (self .force_upgrade_on_signin , bool ):
224228 raise ValueError (
225229 'password_policy_config.force_upgrade_on_signin must be a valid boolean' )
0 commit comments