Skip to content

Commit

Permalink
formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pragatimodi committed May 15, 2023
1 parent a1d5e86 commit 8539a96
Showing 1 changed file with 41 additions and 14 deletions.
55 changes: 41 additions & 14 deletions firebase_admin/tenant_mgt.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,13 @@ def get_tenant(tenant_id, app=None):


def create_tenant(
display_name, allow_password_sign_up=None, enable_email_link_sign_in=None,
multi_factor_config: multi_factor_config_mgt.MultiFactorConfig = None, password_policy_config: password_policy_config_mgt.PasswordPolicyConfig = None, app=None):
display_name,
allow_password_sign_up=None,
enable_email_link_sign_in=None,
multi_factor_config: multi_factor_config_mgt.MultiFactorConfig = None,
password_policy_config: password_policy_config_mgt.PasswordPolicyConfig = None,
app=None,
):
"""Creates a new tenant from the given options.
Args:
Expand All @@ -117,14 +122,23 @@ def create_tenant(
"""
tenant_mgt_service = _get_tenant_mgt_service(app)
return tenant_mgt_service.create_tenant(
display_name=display_name, allow_password_sign_up=allow_password_sign_up,
display_name=display_name,
allow_password_sign_up=allow_password_sign_up,
enable_email_link_sign_in=enable_email_link_sign_in,
multi_factor_config=multi_factor_config,password_policy_config = password_policy_config)
multi_factor_config=multi_factor_config,
password_policy_config=password_policy_config,
)


def update_tenant(
tenant_id, display_name=None, allow_password_sign_up=None, enable_email_link_sign_in=None,
multi_factor_config: multi_factor_config_mgt.MultiFactorConfig = None, password_policy_config: password_policy_config_mgt.PasswordPolicyConfig = None, app=None):
tenant_id,
display_name=None,
allow_password_sign_up=None,
enable_email_link_sign_in=None,
multi_factor_config: multi_factor_config_mgt.MultiFactorConfig = None,
password_policy_config: password_policy_config_mgt.PasswordPolicyConfig = None,
app=None,
):
"""Updates an existing tenant with the given options.
Args:
Expand All @@ -148,9 +162,13 @@ def update_tenant(
"""
tenant_mgt_service = _get_tenant_mgt_service(app)
return tenant_mgt_service.update_tenant(
tenant_id, display_name=display_name, allow_password_sign_up=allow_password_sign_up,
tenant_id,
display_name=display_name,
allow_password_sign_up=allow_password_sign_up,
enable_email_link_sign_in=enable_email_link_sign_in,
multi_factor_config=multi_factor_config, password_policy_config=password_policy_config)
multi_factor_config=multi_factor_config,
password_policy_config=password_policy_config,
)


def delete_tenant(tenant_id, app=None):
Expand Down Expand Up @@ -294,8 +312,13 @@ def get_tenant(self, tenant_id):
return Tenant(body)

def create_tenant(
self, display_name, allow_password_sign_up=None, enable_email_link_sign_in=None,
multi_factor_config: multi_factor_config_mgt.MultiFactorConfig = None, password_policy_config: password_policy_config_mgt.PasswordPolicyConfig = None):
self,
display_name,
allow_password_sign_up=None,
enable_email_link_sign_in=None,
multi_factor_config: multi_factor_config_mgt.MultiFactorConfig = None,
password_policy_config: password_policy_config_mgt.PasswordPolicyConfig = None,
):
"""Creates a new tenant from the given parameters."""

payload = {'displayName': _validate_display_name(display_name)}
Expand Down Expand Up @@ -323,10 +346,14 @@ def create_tenant(
return Tenant(body)

def update_tenant(
self, tenant_id, display_name=None, allow_password_sign_up=None,
enable_email_link_sign_in=None,
multi_factor_config: multi_factor_config_mgt.MultiFactorConfig = None,
password_policy_config: password_policy_config_mgt.PasswordPolicyConfig = None):
self,
tenant_id,
display_name=None,
allow_password_sign_up=None,
enable_email_link_sign_in=None,
multi_factor_config: multi_factor_config_mgt.MultiFactorConfig = None,
password_policy_config: password_policy_config_mgt.PasswordPolicyConfig = None,
):
"""Updates the specified tenant with the given parameters."""
if not isinstance(tenant_id, str) or not tenant_id:
raise ValueError('Tenant ID must be a non-empty string.')
Expand Down

0 comments on commit 8539a96

Please sign in to comment.