Skip to content

Commit f43c6c1

Browse files
committed
Fix HfHubHTTPError import for mypy compatibility
Changed import from huggingface_hub.utils to huggingface_hub.errors to fix mypy errors about implicit re-exports. HfHubHTTPError is defined in the errors module and should be imported from there directly.
1 parent 2fc937e commit f43c6c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zenml/integrations/huggingface/deployers/huggingface_deployer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def do_provision_deployment(
319319
)
320320

321321
try:
322-
from huggingface_hub.utils import HfHubHTTPError
322+
from huggingface_hub.errors import HfHubHTTPError
323323

324324
# Create Space if it doesn't exist, or update visibility if needed
325325
try:
@@ -606,7 +606,7 @@ def do_deprovision_deployment(
606606
api = self._get_hf_api()
607607

608608
try:
609-
from huggingface_hub.utils import HfHubHTTPError
609+
from huggingface_hub.errors import HfHubHTTPError
610610

611611
api.delete_repo(repo_id=space_id, repo_type="space")
612612
logger.info(f"Deleted Space: {space_id}")

0 commit comments

Comments
 (0)