Skip to content

Commit

Permalink
Fix "library stubs not installed" mypy error
Browse files Browse the repository at this point in the history
After merging #920,
mypy started to fail with:

'Library stubs not installed for "requests.packages.urllib3.util.retry"'

Looking at the requests source code, it seems that urllib3 is imported
ad-hoc in the packages module, so changing the import to urllib3
directly solved the issue.

I still don't know what caused it originally, since the merge request
was just a bump to the 'packaging' library.

Signed-off-by: Bruno Pimentel <bpimente@redhat.com>
  • Loading branch information
brunoapimentel committed Oct 17, 2023
1 parent 83e4297 commit 51f1967
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cachito/workers/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import requests
import requests_kerberos
from requests.packages.urllib3.util.retry import Retry
from urllib3.util.retry import Retry

from cachito.workers.config import get_worker_config

Expand Down

0 comments on commit 51f1967

Please sign in to comment.