question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

flake8 check does not respect projects python version

See original GitHub issue

pipenv 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
  1. OS Type: Debian 9
  2. Python version: $ python3 -V: Python 3.5.3
  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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
kennethreitzcommented, Dec 19, 2017

I’d be more apt to remove the flake8 checking myself.

1reaction
taioncommented, Dec 31, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found