Enforce type hinting and remove redundant numpydoc type annotations#717
Enforce type hinting and remove redundant numpydoc type annotations#717dylanhmorris merged 17 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #717 +/- ##
=======================================
Coverage 97.91% 97.91%
=======================================
Files 51 51
Lines 1580 1583 +3
=======================================
+ Hits 1547 1550 +3
Misses 33 33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Update pyproject.toml to add ANN rules (ignoring ANN401) - Add missing type hints to all pyrenew/ source files - Remove type annotations from numpydoc docstring Parameters sections (redundant now that code-level type hints are in place) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@copilot please revise so that |
Co-authored-by: dylanhmorris <8032117+dylanhmorris@users.noreply.github.com>
Done in 4c767e9. All |
for more information, see https://pre-commit.ci
|
@copilot please run |
…ss.py Co-authored-by: dylanhmorris <8032117+dylanhmorris@users.noreply.github.com>
Done in d2b026a. The only remaining ANN401 was in |
|
@damonbayer @cdc-mitzimorris pre-commit is now failing because of lack of type annotation in the test suite. Going back and forth on whether we should enforce it. Thoughts before I we either turn off that rule for the tests or ask copilot to type-annotate the test suite? |
I think we can exclude the tests. |
|
That was my inclination too. @copilot, please exclude all files within the |
Co-authored-by: dylanhmorris <8032117+dylanhmorris@users.noreply.github.com>
Done in 356341c. Added |
dylanhmorris
left a comment
There was a problem hiding this comment.
I have reviewed all changes. This LGTM.
ruffto enforce type hinting (addANNto ruffselect, ignoreANN401)pyrenew/source filesPR04**kwargs: Any/*args: Anyto useobjectinstead ofAnyfrom typing import Anyimportscensorednormal.py,multisignal_model.py,pyrenew_builder.py,observation/base.py,ar.py,math.py)# noqa: ANN401for genuinely-Any argument indifferencedprocess.pytest/fromANNruff checks via[tool.ruff.lint.per-file-ignores]pyrenew/andtest/Original prompt
numpydocdocstrings #716✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.