changed default types to float in solarposition.py#2280
Conversation
|
This pull request will fail on flake8 due to line lengths on some of the documentation. I am not sure how to fix it. |
There have been debates on adding type hints, and I don't think we're agreed that pvlib benefits by adding them. Specifying float for those defaults is not controversial; thanks for doing that. |
|
Got it, happy to remove type hinting if that helps push this PR through. |
|
Agreed, there is no consensus about adopting type hints in pvlib. Until then, no hints! Nitpick: if the default values are changing from int to float (e.g. |
|
@kandersolar good point! I'll give that a quick edit today |
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
kandersolar
left a comment
There was a problem hiding this comment.
LGTM after the linter complaint is resolved
Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>
I hope that this fixes the flake8 errors. I attempted to mimic the multi-line links seen in other parts of this .py file
kandersolar
left a comment
There was a problem hiding this comment.
Reverting a couple linter-related changes, as they seem to render poorly in the sphinx output and are not required for this PR
|
Thanks @kurt-rhee! |
docs/sphinx/source/referencefor API changes.docs/sphinx/source/whatsnewfor all changes. Includes link to the GitHub Issue with:issue:`num`or this Pull Request with:pull:`num`. Includes contributor name and/or GitHub username (link with:ghuser:`user`).remote-data) and Milestone are assigned to the Pull Request and linked Issue.I have added type hints to get_solarposition() and I have also changed the default values of the function inputs to
floatinstead ofintto make my linter stop yelling at me.