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

schedule.every expects int instead of float #559

Open
tthe-the-j opened this issue Jan 23, 2023 · 1 comment
Open

schedule.every expects int instead of float #559

tthe-the-j opened this issue Jan 23, 2023 · 1 comment

Comments

@tthe-the-j
Copy link

floats seem to still work so it may just be a type hinting mistake.
def every(interval: int = 1) -> Job
should become
def every(interval: float = 1) -> Job

@SijmenHuizenga
Copy link
Collaborator

The interval is passed into datetime.timedelta, and apparently float arguments are supported. So i guess floats should indeed work just fine. However, i would be hesitant to change the typing without also adding some unit to verify it defiantly works and keeps working in the future. I'm happy to review and merge a pr like that.

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

No branches or pull requests

2 participants