--output-file with end of argument (--) worked in 3.7.9 but no longer works in 6.0.0
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Riprodurre i comandi segnalati con flake8 --output-file output.txt -- ./a e confrontarli con le forme funzionanti, concentrandosi sulla gestione degli argomenti della riga di comando da parte di flake8. Il lavoro è completato quando la forma con -- si comporta come il comando equivalente senza --, con un test di regressione che copra --output-file e --tee.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
how did you install flake8?
$ cat requirements_hash.txt
GitPython==3.1.29 --hash=sha256:41eea0deec2deea139b459ac03656f0dd28fc4a3387240ec1d3c259a2c47850f2
PyYAML==6.0 --hash=sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a23
bandit==1.7.4 --hash=sha256:412d3f259dab4077d0e7f0c11f50f650cc7d10db905d98f6520a95a18049658a4
coverage==7.0.0 --hash=sha256:b8f7cd942dda3795fc9eadf303cc53a422ac057e3b70c2ad6d4276ec6a83a5415
entrypoints==0.4 --hash=sha256:f174b5ff827504fd3cd97cc3f8649f3693f51538c7e4bdf3ef002c8429d42f9f6
flake8-bandit==4.1.1 --hash=sha256:4c8a53eb48f23d4ef1e59293657181a3c989d0077c9952717e98a0eace43e06d7
flake8-junit-report==2.1.0 --hash=sha256:f8890c1ebe0acb516fefacddec4b802bca9f89bb07db933e4ee3cd11ceaa1e8b8
flake8-polyfill==1.0.2 --hash=sha256:12be6a34ee3ab795b19ca73505e7b55826d5f6ad7230d31b18e106400169b9e99
flake8==6.0.0 --hash=sha256:3833794e27ff64ea4e9cf5d410082a8b97ff1a06c16aa3d2027339cd0f1195c710
gitdb==4.0.10 --hash=sha256:c286cf298426064079ed96a9e4a9d39e7f3e9bf15ba60701e95f5492f28415c711
mccabe==0.7.0 --hash=sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e12
pbr==5.11.0 --hash=sha256:db2317ff07c84c4c63648c9064a79fe9d9f5c7ce85a9099d4b6258b3db83225a13
pycodestyle==2.10.0 --hash=sha256:8a4eaf0d0495c7395bdab3589ac2db602797d76207242c17d47018681570661014
pyflakes==3.0.1 --hash=sha256:ec55bf7fe21fff7f1ad2f7da62363d749e2a470500eab1b555334b67aa1ef8cf15
six==1.16.0 --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e025416
smmap==5.0.0 --hash=sha256:2aba19d6a040e78d8b09de5c57e96207b09ed71d8e55ce0959eeee6c8e190d9417
stevedore==4.1.1 --hash=sha256:aa6436565c069b2946fe4ebff07f5041e0c8bf18c7376dd29edf80cf7d524e4e18
typing-extensions==4.4.0 --hash=sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e
$ PYTHONDONTWRITEBYTECODE=1 PYTHONHASHSEED=0 SOURCE_DATE_EPOCH=946702800 pip install --no-build-isolation --no-cache-dir --no-compile --require-hashes --requirement requirements_hash.txt
# Note: identical behavior with `pip install flake8` as the installation method.
unmodified output of flake8 --bug-report
{
"platform": {
"python_implementation": "CPython",
"python_version": "3.11.1",
"system": "Linux"
},
"plugins": [
{
"plugin": "flake8-bandit",
"version": "4.1.1"
},
{
"plugin": "mccabe",
"version": "0.7.0"
},
{
"plugin": "pycodestyle",
"version": "2.10.0"
},
{
"plugin": "pyflakes",
"version": "3.0.1"
}
],
"version": "6.0.0"
}
describe the problem
I've been using flake8 in a CI environment called with something like:
find . -name '*.py' -print0 | xargs -0 flake --output-file output.txt --tee --
When upgrading to v6.0.0 I got errors from the above command. It appears to be some interaction between --output-file and --tee.
This sequence sums up the issue pretty well. If you use the -- which indicates no further arguments it fails to operate properly. I expected the last two commands to behave the same.
$ touch a
$ flake8 ./a
$ flake8 --output-file output.txt ./a
$ flake8 --output-file output.txt -- ./a
Unable to find qualified name for module: output.txt
--output-file:0:1: E902 FileNotFoundError: [Errno 2] No such file or directory: '--output-file'
$
- Lingua principale
- Python
- Stelle
- 3.8k
- Fork
- 364
- Merge medio
- 3h 25m
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PyCQA/flake8
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Tutte le issue di PyCQA/flake8
Issue simili
-
repo-audit
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
scverse/repo-health#20 ·
I maintainer di solito rispondono entro 1 giorno
-
/context/prime scope override double-prefixes an entity-ref project and drops its scoped memoriesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
phasespace-labs/palinode#232 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
collective/icalendar#1858 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
lfx-mcp cannot supply global variables: LangflowClient drops X-LANGFLOW-GLOBAL-VAR-* from envApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
langflow-ai/langflow#15496 ·
I maintainer di solito rispondono entro 1 giorno