-
Notifications
You must be signed in to change notification settings - Fork 1.1k
changed default types to float in solarposition.py #2280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after the linter complaint is resolved
Co-authored-by: Adam R. Jensen <[email protected]>
I hope that this fixes the flake8 errors. I attempted to mimic the multi-line links seen in other parts of this .py file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/reference
for API changes.docs/sphinx/source/whatsnew
for 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
float
instead ofint
to make my linter stop yelling at me.