Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Having flake8 extensions install at system level will break projects and there is no way to disable them

Aperta
#488 9 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

Riproduci il problema installando flake8-docstrings ed eseguendo flake8 su un progetto con impostazioni in setup.cfg. Inizia tracciando il modo in cui flake8 individua i plugin e legge setup.cfg, quindi definisci come deve comportarsi un elenco esplicito di plugin o un'impostazione ignore. Il lavoro è completato quando le estensioni installate a livello di sistema non modificano più i risultati se la configurazione del progetto le esclude.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

In GitLab by @ssbarnea on Apr 30, 2016, 14:27

Here is a very simple to replicate use case, just install flake8-docstrings and now run flake8 on any project that was already using it.

You will have a change of over 99% to fail passing the flake8 tests, and there is no way to disable those plugins from inside the setup.cfg.

I raise a bug month than a month ago on flake8-docstrigs regarding this issue and got no reply at all, it seems that the project not maintained at all.

Assuming that that's not an isolated case we need a way to assure that the linting settings are locked within the setup.cfg, so the final result will not depend on whichever additional modules you may have installed on your system-modules.

I know that someone with inevitably try to propose a virtual environment with --no-site-packages but please remember that those are not always possible, there are several use-cases where people are forced to import system-packages (like on continous integration systems where you cannot afford to increase the footprint of each build with 500MB just because your projects is using numpy and pandas).

Flake8 needs an option to tell it to use a specific list of plugins and to ignore others.

See https://gitlab.com/pycqa/flake8-docstrings/issues/10

Lingua principale
Python
Stelle
3.8k
Fork
364
Merge medio
3h 25m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PyCQA/flake8

Tutte le issue di PyCQA/flake8

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.