You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you running Flake8 on Python 2 against Python 3 code? If so, install Flake8 on Python 3, remove that ignore line, and then re-run it. The problem should disappear.
If you can't run it on Python 3, try out the --builtins flag. From flake8 -h:
--builtins=BUILTINS define more built-ins, comma separated
In GitLab by @przemyslaw-hejman on Jul 20, 2015, 06:00
Hey Ian,
Thanks for your assistance here! I was running flake8 on python3 against python3... Anyway, --builtins works for me well. Feel free to close this issue.
@przemyslaw-hejman it's important that if you're writing code for Python 3.4 to be running Flake8 under Python 3.4 (for example). The builtins shouldn't change drastically between versions, but Python 3 is a rapidly evolving language. That said, ConnectionRefusedError looks to have been made a built-in type in Python 3.3. If you're running Flake8 on an earlier version of Python (3.2 or 3.1 for example) it is rightfully complaining that ConnectionRefusedError is not defined.
Can you confirm that flake8 is running against the same version of python you're using? Not just Python3?
Activity
asottile commentedon Apr 3, 2021
In GitLab by @sigmavirus24 on Jul 17, 2015, 05:53
Are you running Flake8 on Python 2 against Python 3 code? If so, install Flake8 on Python 3, remove that ignore line, and then re-run it. The problem should disappear.
If you can't run it on Python 3, try out the
--builtinsflag. Fromflake8 -h:asottile commentedon Apr 3, 2021
In GitLab by @sigmavirus24 on Jul 17, 2015, 05:54
In the future, please ask your question on StackOverflow.
asottile commentedon Apr 3, 2021
In GitLab by @sigmavirus24 on Jul 18, 2015, 18:45
@przemyslaw-hejman
Do you need anything else from this or can this be closed?
asottile commentedon Apr 3, 2021
In GitLab by @przemyslaw-hejman on Jul 20, 2015, 06:00
Hey Ian,
Thanks for your assistance here! I was running flake8 on python3 against python3... Anyway, --builtins works for me well. Feel free to close this issue.
asottile commentedon Apr 3, 2021
In GitLab by @sigmavirus24 on Jul 20, 2015, 07:58
@przemyslaw-hejman it's important that if you're writing code for Python 3.4 to be running Flake8 under Python 3.4 (for example). The builtins shouldn't change drastically between versions, but Python 3 is a rapidly evolving language. That said, ConnectionRefusedError looks to have been made a built-in type in Python 3.3. If you're running Flake8 on an earlier version of Python (3.2 or 3.1 for example) it is rightfully complaining that ConnectionRefusedError is not defined.
Can you confirm that flake8 is running against the same version of python you're using? Not just Python3?
asottile commentedon Apr 3, 2021
In GitLab by @sigmavirus24 on Jul 20, 2015, 08:02
For what it's worth, I cannot verify this: