Skip to content

Commit

Permalink
mypy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh committed Jan 14, 2025
1 parent 55895f4 commit 33f4383
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cached_path/schemes/hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from typing import Optional

import huggingface_hub as hf_hub
import requests
import requests # type: ignore[import-untyped]
from huggingface_hub.utils import (
EntryNotFoundError,
RepositoryNotFoundError,
Expand Down
6 changes: 3 additions & 3 deletions cached_path/schemes/http.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import io
from typing import Optional

import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
import requests # type: ignore[import-untyped]
from requests.adapters import HTTPAdapter # type: ignore[import-untyped]
from urllib3.exceptions import MaxRetryError
from urllib3.util.retry import Retry

from .scheme_client import SchemeClient

Expand Down
2 changes: 1 addition & 1 deletion cached_path/schemes/scheme_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from abc import ABC, abstractmethod
from typing import ClassVar, Optional, Tuple, Type, Union

import requests
import requests # type: ignore[import-untyped]


class SchemeClient(ABC):
Expand Down
5 changes: 4 additions & 1 deletion tests/cached_path_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
import pytest
import responses
from flaky import flaky
from requests.exceptions import ConnectionError, HTTPError
from requests.exceptions import ( # type: ignore[import-untyped]
ConnectionError,
HTTPError,
)

from cached_path._cached_path import cached_path, get_from_cache
from cached_path.bytes_range import get_bytes_range
Expand Down

0 comments on commit 33f4383

Please sign in to comment.