You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[MNT] Add docstring linting (D-class rules) to ruff configuration (#247)
This PR addresses the issue of missing docstring linting in the OpenML
server API #212 .
### Changes:
1. **Datetime Linting (DTZ)**:
- Fixed 6 violations where naive datetimes were used.
- Enabled the `DTZ` ruleset in `ruff` configuration.
2. **Docstring Linting (D)**:
- Fixed minor formatting and style violations across the codebase.
- Added module docstrings to all `__init__.py` files to satisfy D104.
- Enabled the `D` ruleset in `ruff` configuration.
- **Grandfathering Strategy**: To avoid a massive effort of writing
docstrings for 33 legacy files, I added `per-file-ignores` for D100,
D101, D102, and D103 for those specific files. This ensures all *new*
files and code must include docstrings, while legacy code can be updated
gradually.
- Maintained existing project preferences for docstring style
(D211/D212).
- Kept tests exempted from docstring rules as per standard practice.
### Verification:
- All changes verified with `ruff check .` and they pass.
- Python 3.12 `UTC` constant was used for datetime awareness.
---------
Co-authored-by: PGijsbers <p.gijsbers@tue.nl>
0 commit comments