Unterhaltung
Nachrichten
-
-
Troubleshooting things on my phone on my way home.
flake8 mysteriously reports pylint warnings when flakehell is installed. But flake8 does it better. flakehell has false positives on "Unable to import" because the top dir is not in sys.path. -
Here we go:
github.com/life4/flakehell/blo…[tool.flit.entrypoints."flake8.extension"] pylint = "flakehell.plugins:PyLintChecker"
-
Oh. flake8 cannot run in termux:
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.
But now I'm home anyway so. -
Other than this issue flakehell is awesome and does things better than our homegrown similar solution.
-
The plot thickens:$ flake8 ./asdf/zxcv.py:1:1: F401 'qwer' imported but unused ./asdf/zxcv.py:1:1: E0401 Unable to import 'qwer' ./asdf/zxcv.py:1:1: W0611 Unused import qwer$ flake8 -j 1 ./asdf/zxcv.py:1:1: F40…
-
If I put a try-except-print `
import qwer
` inside the checker, it fails both in the parallel and the sequential case, even though they report differently. Need to check how pylint verifies E0401. -
It uses astroid:
gitlab.com/pycqa/pylint/-/blob…
So let's see if we can call astroid with some thing and figure out what differs.sys.path
andos.getcwd()
show no difference between parallel and sequential mode. -
omg I found itThe single-process sequential case accidentally finds the `qwer` module because it happens to be in Astroid's cache after the linter checked `qwer` itself.gitlab.com/pycqa/astroid/-/blo…So it is *no…
-
This original observation on whether flakehell or flake8 shows the false positive is funny. On my home system both were showing it at first, and now it's flake8 showing it and flakehell not. I'm guessing it's something about file system order or something.
-