Skip to content

Commit c1e44d8

Browse files
jeremymanningclaude
andcommitted
Fix linting issues after HuggingFace API endpoint change
- Apply black formatting to notebook_magic.py (trailing whitespace) - Add noqa comments for intentionally unused imports in test_widget_fixes.py - These imports are required for dependency availability checking All quality checks now pass: - mypy: ✅ No issues found in 26 source files - pytest: ✅ 312/312 tests passing - flake8: ✅ No linting errors - documentation: ✅ Builds successfully 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2291243 commit c1e44d8

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

clustrix/notebook_magic.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,7 +2091,7 @@ def _test_huggingface_connectivity(self, config):
20912091
if not hf_token:
20922092
return False
20932093

2094-
# Test HuggingFace API connectivity using models endpoint
2094+
# Test HuggingFace API connectivity using models endpoint
20952095
# (whoami endpoint appears to have permission issues with some tokens)
20962096
headers = {"Authorization": f"Bearer {hf_token}"}
20972097
response = requests.get(
@@ -2110,13 +2110,17 @@ def _test_huggingface_connectivity(self, config):
21102110
if response.status_code == 200:
21112111
# Successfully authenticated and can access models API
21122112
models = response.json()
2113-
2113+
21142114
# Debug: Print successful connection info
21152115
if hasattr(self, "status_output"):
21162116
with self.status_output:
2117-
print(f"🔍 Debug: Successfully retrieved {len(models)} model(s)")
2117+
print(
2118+
f"🔍 Debug: Successfully retrieved {len(models)} model(s)"
2119+
)
21182120
if hf_username:
2119-
print(f"🔍 Debug: Token validated for user: '{hf_username}'")
2121+
print(
2122+
f"🔍 Debug: Token validated for user: '{hf_username}'"
2123+
)
21202124

21212125
return True
21222126

tests/test_widget_fixes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
# Check if widget dependencies are available
1313
try:
14-
import IPython
15-
import ipywidgets
14+
import IPython # noqa: F401
15+
import ipywidgets # noqa: F401
1616

1717
WIDGET_DEPS_AVAILABLE = True
1818
except ImportError:

0 commit comments

Comments
 (0)