Skip to content

Commit ba36516

Browse files
committed
visual indentation
Signed-off-by: NAYANAR <nayana.r5@ibm.com>
1 parent 880edbc commit ba36516

File tree

1 file changed

+13
-25
lines changed

1 file changed

+13
-25
lines changed

mcpgateway/admin.py

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3757,7 +3757,7 @@ async def admin_get_team_edit(
37573757
if not team:
37583758
return HTMLResponse(content='<div class="text-red-500">Team not found</div>', status_code=404)
37593759

3760-
edit_form = fr"""
3760+
edit_form = rf"""
37613761
<div class="space-y-4">
37623762
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">Edit Team</h3>
37633763
<form method="post" action="{root_path}/admin/teams/{team_id}/update" hx-post="{root_path}/admin/teams/{team_id}/update" hx-target="#team-edit-modal-content" class="space-y-4">
@@ -4871,8 +4871,7 @@ async def admin_get_user_edit(
48714871
# Build Password Requirements HTML separately to avoid backslash issues inside f-strings
48724872
if settings.password_require_uppercase or settings.password_require_lowercase or settings.password_require_numbers or settings.password_require_special:
48734873
pr_lines = []
4874-
pr_lines.append(f"""
4875-
<!-- Password Requirements -->
4874+
pr_lines.append(f""" <!-- Password Requirements -->
48764875
<div class="bg-blue-50 dark:bg-blue-900 border border-blue-200 dark:border-blue-700 rounded-md p-4">
48774876
<div class="flex items-start">
48784877
<svg class="h-5 w-5 text-blue-600 dark:text-blue-400 flex-shrink-0 mt-0.5" viewBox="0 0 20 20" fill="currentColor">
@@ -4885,40 +4884,29 @@ async def admin_get_user_edit(
48854884
<span class="inline-flex items-center justify-center w-4 h-4 bg-gray-400 text-white rounded-full text-xs mr-2">✗</span>
48864885
<span>At least {settings.password_min_length} characters long</span>
48874886
</div>
4888-
"""
4889-
)
4887+
""")
48904888
if settings.password_require_uppercase:
4891-
pr_lines.append(
4892-
"""
4889+
pr_lines.append("""
48934890
<div class="flex items-center" id="req-uppercase"><span class="inline-flex items-center justify-center w-4 h-4 bg-gray-400 text-white rounded-full text-xs mr-2">✗</span><span>Contains uppercase letters (A-Z)</span></div>
4894-
"""
4895-
)
4891+
""")
48964892
if settings.password_require_lowercase:
4897-
pr_lines.append(
4898-
"""
4893+
pr_lines.append("""
48994894
<div class="flex items-center" id="req-lowercase"><span class="inline-flex items-center justify-center w-4 h-4 bg-gray-400 text-white rounded-full text-xs mr-2">✗</span><span>Contains lowercase letters (a-z)</span></div>
4900-
"""
4901-
)
4895+
""")
49024896
if settings.password_require_numbers:
4903-
pr_lines.append(
4904-
"""
4897+
pr_lines.append("""
49054898
<div class="flex items-center" id="req-numbers"><span class="inline-flex items-center justify-center w-4 h-4 bg-gray-400 text-white rounded-full text-xs mr-2">✗</span><span>Contains numbers (0-9)</span></div>
4906-
"""
4907-
)
4899+
""")
49084900
if settings.password_require_special:
4909-
pr_lines.append(
4910-
"""
4901+
pr_lines.append("""
49114902
<div class="flex items-center" id="req-special"><span class="inline-flex items-center justify-center w-4 h-4 bg-gray-400 text-white rounded-full text-xs mr-2">✗</span><span>Contains special characters (!@#$%^&amp;*(),.?&quot;:{{}}|&lt;&gt;)</span></div>
4912-
"""
4913-
)
4914-
pr_lines.append(
4915-
"""
4903+
""")
4904+
pr_lines.append("""
49164905
</div>
49174906
</div>
49184907
</div>
49194908
</div>
4920-
"""
4921-
)
4909+
""")
49224910
password_requirements_html = "".join(pr_lines)
49234911
else:
49244912
# Intentionally an empty string for HTML insertion when no requirements apply.

0 commit comments

Comments
 (0)