theupdateframework / theupdateframework/python-tuf
Improve docstrings on exceptions
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 1.7k
- Fork
- 304
- Merge medio
- 1g 2h
- PR unite (30g)
- 17
Descrizione
Current behavior:
Currently, in tuf/api/metadata.py we are using multiple ways to document our custom TUF exceptions.
There are two main ways of how we handle exceptions:
- there are places where we define an exception with the full module name:
https://github.com/theupdateframework/python-tuf/blob/0f1fc6e33cbc4d4c6b502b9f8c64b119d1a4ad2f/tuf/api/metadata.py#L185 - and in other cases, we document only the name of the exception: https://github.com/theupdateframework/python-tuf/blob/0f1fc6e33cbc4d4c6b502b9f8c64b119d1a4ad2f/tuf/api/metadata.py#L346
Expected behavior:
Decide how we want to document our exceptions and stick to that.
Document how we should write docstrings about exceptions somewhere.
I didn't find any mentions about the exception docstrings in the Google Python guidelines
Guida per i contributori
Apri 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.
Direzione di ricerca
Inizia in tuf/api/metadata.py, nelle docstring delle eccezioni intorno alle righe indicate 185 e 346, e confronta i due stili documentati. Decidi una convenzione coerente per le docstring delle eccezioni, aggiorna le docstring interessate e documenta la convenzione in un punto qualsiasi del progetto; il lavoro è completato quando gli stili sono coerenti e le indicazioni sono disponibili.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100