Skip to content
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

Develop #25

Merged
merged 8 commits into from
Mar 5, 2024
Merged

Develop #25

merged 8 commits into from
Mar 5, 2024

Conversation

kstopa
Copy link
Collaborator

@kstopa kstopa commented Mar 5, 2024

  • Added tests
  • Added GitHub actions
  • Added flake8 listing
  • Updated docs

@kstopa kstopa merged commit 6e907a9 into master Mar 5, 2024
6 checks passed
:return: sunrise datetime.
:raises: SunTimeException when there is no sunrise and sunset on given location and date.
"""
date = datetime.datetime.now() if date is None else date
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI changing this is a regression: the today value is captured when the module is imported and the function is defined, then it stays the same as long as the process runs. Any web app for example using this function with the default value would get incorrect results after some time.

(+ also a doc issue: mention of now is not accurate, the value is a date not a datetime)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants