pypuppetdb
pypuppetdb copied to clipboard
Type hints, test building docs
Instead of declaring types in the docstrings let's use PEP 484 type hints. Thanks to the sphinx-autodoc-typehints extension they will be added to the docs but also work as static types to add type safety to this library.
Also add a GitHub Action doc building test to avoid getting commits like https://github.com/voxpupuli/pypuppetdb/commit/6c8c3a8bae17b12b1375a15c588dd5d5cc01a035 that are breaking docs building (https://readthedocs.org/projects/pypuppetdb/builds/13531565/) getting into the master branch.
Coverage increased (+0.05%) to 84.581% when pulling adbf8684c001c8e895f713591a7d645d8c8f954b on gdubicki:type_hints into bc9be84163b10040c5b582294ce049168f1b1e2e on voxpupuli:master.
Codecov Report
Merging #210 (2eee541) into master (3a247ae) will increase coverage by
0.07%
. The diff coverage is96.66%
.
@@ Coverage Diff @@
## master #210 +/- ##
==========================================
+ Coverage 84.96% 85.03% +0.07%
==========================================
Files 14 14
Lines 918 929 +11
==========================================
+ Hits 780 790 +10
- Misses 138 139 +1
Impacted Files | Coverage Δ | |
---|---|---|
pypuppetdb/types.py | 71.01% <96.00%> (+0.71%) |
:arrow_up: |
pypuppetdb/api/query.py | 56.09% <100.00%> (+0.54%) |
:arrow_up: |
pypuppetdb/utils.py | 95.65% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 3a247ae...2eee541. Read the comment docs.
Partially done in #220.