Skip to content

Commit 2c8fd9f

Browse files
guidooswaldDBclaude
andcommitted
Fix all ruff linter errors: unused imports, duplicate import, E701, stray f-string
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0bfd972 commit 2c8fd9f

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

app.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
get_cli_profiles,
4040
get_current_user_info,
4141
get_host,
42-
get_local_token,
4342
get_workspace_name,
4443
make_api_call,
4544
resolve_local_connection,
@@ -522,7 +521,6 @@ def _sso_try_cached(host: str) -> Optional[str]:
522521

523522

524523
# ── Background SSO browser flow ──────────────────────────────────────
525-
import threading
526524

527525
_sso_result: Dict[str, Any] = {} # host → {"token": ..., "error": ..., "done": bool}
528526
_sso_lock = threading.Lock()
@@ -623,10 +621,14 @@ def build_response_panel(
623621
A Dash ``html.Div`` component tree.
624622
"""
625623
code, ms, data = result["status_code"], result["elapsed_ms"], result["data"]
626-
if 200 <= code < 300: status_color, icon = "success", "bi-check-circle-fill"
627-
elif code == 0: status_color, icon = "danger", "bi-x-octagon-fill"
628-
elif 400 <= code < 500: status_color, icon = "danger", "bi-x-circle-fill"
629-
else: status_color, icon = "warning", "bi-exclamation-circle-fill"
624+
if 200 <= code < 300:
625+
status_color, icon = "success", "bi-check-circle-fill"
626+
elif code == 0:
627+
status_color, icon = "danger", "bi-x-octagon-fill"
628+
elif 400 <= code < 500:
629+
status_color, icon = "danger", "bi-x-circle-fill"
630+
else:
631+
status_color, icon = "warning", "bi-exclamation-circle-fill"
630632

631633
item_count = ""
632634
if isinstance(data, list):
@@ -2448,7 +2450,7 @@ def update_curl_display(last_req, conn_config):
24482450
full_url = f"{base_url}?{urlencode(query_params)}" if query_params else base_url
24492451

24502452
lines = [f"curl -X {method} \\", f" '{full_url}' \\", f" -H 'Authorization: Bearer {token}' \\",
2451-
f" -H 'Content-Type: application/json'"]
2453+
" -H 'Content-Type: application/json'"]
24522454
if body:
24532455
lines[-1] += " \\"
24542456
lines.append(f" -d '{json.dumps(body, separators=(',', ':'))}'")

auth.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
DATABRICKS_PROFILE: Default CLI profile name resolved from
1818
``~/.databrickscfg`` at import time.
1919
"""
20-
import configparser
2120
import os
2221
import time
2322
from functools import lru_cache

0 commit comments

Comments
 (0)