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

Make implicit optional explicit #567

Merged
merged 1 commit into from
Apr 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions schedule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class Job(object):
method, which also defines its `interval`.
"""

def __init__(self, interval: int, scheduler: Scheduler = None):
def __init__(self, interval: int, scheduler: Optional[Scheduler] = None):
self.interval: int = interval # pause interval * unit between runs
self.latest: Optional[int] = None # upper limit to the interval
self.job_func: Optional[functools.partial] = None # the job job_func to run
Expand Down Expand Up @@ -465,7 +465,7 @@ def tag(self, *tags: Hashable):
self.tags.update(tags)
return self

def at(self, time_str: str, tz: str = None):
def at(self, time_str: str, tz: Optional[str] = None):

"""
Specify a particular time that the job should be run at.
Expand Down