flake8 check does not respect projects python version
See original GitHub issuepipenv check --style
appears to run the syntax check depending on its own python version instead of respecting the python version specified in the projects Pipfile.
Describe your environment
- OS Type: Debian 9
- Python version:
$ python3 -V
:Python 3.5.3
- Pipenv version:
$ pipenv --version
:pipenv, version 9.0.1
Expected result
No errors.
Actual result
/home/user/myenv/testfile.py:2:18: E999 SyntaxError: invalid syntax
Steps to replicate
pipenv check --style testfile.py
testfile.py
bar = 'baz'
print(f'foo {bar}')
Pipfile
[[source]]
verify_ssl = true
url = "https://pypi.python.org/simple"
name = "pypi"
[requires]
python_version = "3.6"
[dev-packages]
[packages]
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top Results From Across the Web
flake8-respect-noqa - PyPI
By default, flake8 ignores # NOQA directives for some PEP8 errors. See https://gitlab.com/pycqa/flake8/issues/21. This flake8 plugin makes it respect them.
Read more >flake8 Documentation - Read the Docs
In many ways, Flake8 is tied to the version of Python on which it runs. ... The project Flake8 depends on to lint...
Read more >Release 3.9.1 Ian Stapleton Cordasco - Flake8
Since that will tell the correct version of Python to run Flake8. Note: Installing Flake8 once will not install it on both Python...
Read more >flake8-annotations - Python Package Health Analysis | Snyk
Snyk scans all the packages in your projects for vulnerabilities and ... What this won't do: Check variable annotations (see: PEP 526), respect...
Read more >Hypermodern Python Chapter 3: Linting - Claudio Jolowicz
C are violations reported by mccabe, which checks the code complexity of your Python package against a configured limit. Configure Flake8 using ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d be more apt to remove the flake8 checking myself.
It would be great to remove the Flake8 integration. In addition to the integration not working quite right, I also find it quite odd to see Flake8 end up in my production environments via Pipenv.