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

Document how to test plugins

Aperta
#705 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
documentation

Direzione di ricerca

Inizia dalla documentazione esistente di plugin-development/formatters e dal contesto della migrazione da flake8 2.x a 3.x descritto nell’issue. Documenta un esempio completo che copra punti di ingresso validi di funzione o classe, il test di una stringa rispetto a un controllo e l’esecuzione dei controlli standard senza un sottoprocesso. Il lavoro è completato quando l’esempio risponde a tutte e tre le domande ed è adatto a una PR di documentazione.

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

Descrizione

component:docs component:legacy-api

In GitLab by @stephenfin on May 23, 2019, 03:07

I'm trying to migrate hacking from flake8 2.x to 3.x and finding it extremely difficult to do so because the internals of the flake8 have changed so drastically between these versions (plus hacking does some stuff that's too smart for its own good, IMO). The flake8 documentation provides some introductory text on plugins, including a guide on writing a "formatting type" plugin (though it doesn't explain what a formatting plugin actually is...) but there's nothing about testing this or even what type of class or function the entrypoints should point to. The biggest issue I have is that I want to run flake8 in it entirety (i.e. with both the standard checks and my plugin enabled) on a test string, but there doesn't appear to be anyway to do this.

Would it be possible to get a small worked example that demonstrates:

  • What the entrypoint should look like (i.e. if it can be a Python function, a class, or both)
  • How you can test a string against only a single check
  • How you can test a string against flake8's standard checks (without having to resort to a subprocess call)

I'll happily submit a documentation PR based on this example, if it would be helpful.

Lingua principale
Python
Stelle
3.8k
Fork
356
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.