theupdateframework / theupdateframework/python-tuf
Improve docstrings on exceptions
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 1.7k
- Forks
- 304
- Ø Merge
- 1 T. 2 Std.
- Gemergte PRs (30 T.)
- 17
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in tuf/api/metadata.py bei den Exception-Docstrings rund um die referenzierten Zeilen 185 und 346 und vergleiche die beiden dokumentierten Stile. Entscheide dich für eine konsistente Konvention für Exception-Docstrings, aktualisiere die betroffenen Docstrings und dokumentiere die Konvention irgendwo im Projekt; fertig ist die Aufgabe, wenn die Stile konsistent sind und die Richtlinie verfügbar ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100