pylint icon indicating copy to clipboard operation
pylint copied to clipboard

`Unable to import 'requests.packages.urllib3.util.retry'`

Open yellowhat opened this issue 1 year ago • 0 comments

Bug description

Hi, consider the following:

$ python -c "from requests.packages.urllib3.util.retry import Retry"; echo $?
0
$ python -c "import requests.packages.urllib3.util.retry"; echo $?
0

But pylint is flagging Unable to import 'requests.packages.urllib3.util.retry'

Seems a false positive to me.

Thanks

Configuration

No response

Command used

pylint --verbose --min-similarity-lines 8 --max-args 10 --max-locals 20 --max-line-length 200 $(find . -iname "*.py")

Pylint output

No config file found, using default configuration
************* Module config
config.py:8:0: E0401: Unable to import 'requests.packages.urllib3.util.retry' (import-error)

Expected behavior

Succeed

Pylint version

pylint 2.14.5
astroid 2.11.7
Python 3.10.5 (main, Jul 19 2022, 02:32:29) [GCC 11.2.1 20220219]

OS / Environment

No response

Additional dependencies

podman run -it --rm -v "$PWD:/data" -w "/data" python:alpine sh

yellowhat avatar Jul 19 '22 09:07 yellowhat