adafruit / adafruit/Adafruit_CircuitPython_datetime

dunder methods are not documented

Open
#28 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4
Forks
6
PR merge metrics
No merged PRs in 30d

Description

adafruit_datetime defines a large number of "dunder" methods for date/time arithmetic and comparisons, but they are not listed in the documentation because they start with `_`. This is a general problem with Sphinx, though there are workarounds: see https://stackoverflow.com/questions/62142793/autosummary-generated-documentation-missing-all-dunder-methods-except-for-ini and https://github.com/sphinx-doc/sphinx/issues/12858.

In the CPython documentation for `datetime`, written by humans, the effect of the dunder operations is listed in a big table: https://docs.python.org/3/library/datetime.html#datetime.timedelta.microseconds (following).

I told someone we didn't support date/time arithmetic, which was wrong, because I didn't see it in the documentation. We should figure out some way of making those operations visible, or list them by hand.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Sphinx configuration and generated documentation for adafruit_datetime, then review the linked Sphinx workaround and CPython datetime operation table. Done means the supported dunder methods for date/time arithmetic and comparisons are visible and accurately described in the documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.