Skip to content

Commit

Permalink
Remove useless string concats
Browse files Browse the repository at this point in the history
  • Loading branch information
SijmenHuizenga committed Feb 8, 2021
1 parent 51fec42 commit a09382e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions schedule/__init__.py
Expand Up @@ -241,7 +241,7 @@ def __str__(self):
job_func_name = repr(self.job_func)

return (
"Job(interval={}, " "unit={}, " "do={}, " "args={}, " "kwargs={})"
"Job(interval={}, unit={}, do={}, args={}, kwargs={})"
).format(
self.interval,
self.unit,
Expand Down Expand Up @@ -439,10 +439,10 @@ def at(self, time_str):
raise ScheduleValueError("Invalid time format")
if self.unit == "hours":
if not re.match(r"^([0-5]\d)?:[0-5]\d$", time_str):
raise ScheduleValueError(("Invalid time format for" " an hourly job"))
raise ScheduleValueError(("Invalid time format for an hourly job"))
if self.unit == "minutes":
if not re.match(r"^:[0-5]\d$", time_str):
raise ScheduleValueError(("Invalid time format for" " a minutely job"))
raise ScheduleValueError(("Invalid time format for a minutely job"))
time_values = time_str.split(":")
if len(time_values) == 3:
hour, minute, second = time_values
Expand Down
2 changes: 1 addition & 1 deletion test_schedule.py
Expand Up @@ -436,7 +436,7 @@ def job_fun():

s = repr(every().minute.do(job_fun, "foo", bar=23))
assert s.startswith(
"Every 1 minute do job_fun('foo', bar=23) " "(last run: [never], next run: "
"Every 1 minute do job_fun('foo', bar=23) (last run: [never], next run: "
)
assert "job_fun" in s
assert "foo" in s
Expand Down

0 comments on commit a09382e

Please sign in to comment.