notify-api-412 use black to enforce python style standards

This commit is contained in:
Kenneth Kehl
2023-08-23 10:35:43 -07:00
parent a7898118d7
commit 026dc14021
586 changed files with 33990 additions and 23461 deletions

View File

@@ -1,56 +1,54 @@
post_verify_code_schema = {
'$schema': 'http://json-schema.org/draft-07/schema#',
'description': 'POST schema for verifying a 2fa code',
'type': 'object',
'properties': {
'code': {'type': 'string'},
'code_type': {'type': 'string'},
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "POST schema for verifying a 2fa code",
"type": "object",
"properties": {
"code": {"type": "string"},
"code_type": {"type": "string"},
},
'required': ['code', 'code_type'],
'additionalProperties': False
"required": ["code", "code_type"],
"additionalProperties": False,
}
post_verify_webauthn_schema = {
'$schema': 'http://json-schema.org/draft-07/schema#',
'description': 'POST schema for verifying a webauthn login attempt',
'type': 'object',
'properties': {
'successful': {'type': 'boolean'}
},
'required': ['successful'],
'additionalProperties': False
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "POST schema for verifying a webauthn login attempt",
"type": "object",
"properties": {"successful": {"type": "boolean"}},
"required": ["successful"],
"additionalProperties": False,
}
post_send_user_email_code_schema = {
'$schema': 'http://json-schema.org/draft-07/schema#',
'description': (
"$schema": "http://json-schema.org/draft-07/schema#",
"description": (
'POST schema for generating a 2fa email - "to" is required for legacy purposes. '
'"next" is an optional url to redirect to on sign in'
),
'type': 'object',
'properties': {
"type": "object",
"properties": {
# doesn't need 'to' as we'll just grab user.email_address. but lets keep it
# as allowed to keep admin code cleaner, but only as null to prevent confusion
'to': {'type': 'null'},
'email_auth_link_host': {'type': ['string', 'null']},
'next': {'type': ['string', 'null']},
"to": {"type": "null"},
"email_auth_link_host": {"type": ["string", "null"]},
"next": {"type": ["string", "null"]},
},
'required': [],
'additionalProperties': False
"required": [],
"additionalProperties": False,
}
post_send_user_sms_code_schema = {
'$schema': 'http://json-schema.org/draft-07/schema#',
'description': 'POST schema for generating a 2fa sms',
'type': 'object',
'properties': {
'to': {'type': ['string', 'null']},
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "POST schema for generating a 2fa sms",
"type": "object",
"properties": {
"to": {"type": ["string", "null"]},
},
'required': [],
'additionalProperties': False
"required": [],
"additionalProperties": False,
}
@@ -60,8 +58,8 @@ post_set_permissions_schema = {
"type": "object",
"properties": {
"permissions": {"type": "array", "items": {"type": "object"}},
"folder_permissions": {"type": "array", "items": {"type": "string"}}
"folder_permissions": {"type": "array", "items": {"type": "string"}},
},
"required": ["permissions"],
"additionalProperties": False
"additionalProperties": False,
}