Skip to content

Commit

Permalink
Merge pull request #1094 from stevenhua0320/lint-check-16
Browse files Browse the repository at this point in the history
Fix E722 issue for dates.py and deploy.py
  • Loading branch information
sbillinge authored Jul 6, 2024
2 parents 2b861d6 + 1e11aaf commit 35eafda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions regolith/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def get_due_date(thing):
elif isinstance(due_date, datetime.date):
pass
else:
raise RuntimeError(f"due date not a known type")
raise RuntimeError("due date not a known type")
return due_date


Expand Down Expand Up @@ -374,7 +374,7 @@ def is_current(thing, now=None):
try:
if dates.get("begin_date") <= now <= dates.get("end_date"):
current = True
except:
except RuntimeError:
raise RuntimeError(f"Cannot find begin_date in document:\n {thing['_id']}")
return current

Expand Down Expand Up @@ -402,7 +402,7 @@ def has_started(thing, now=None):
try:
if dates.get("begin_date") <= now:
started = True
except:
except RuntimeError:
raise RuntimeError(f"Cannot find begin_date in document:\n {thing}")
return started

Expand Down Expand Up @@ -457,7 +457,7 @@ def is_before(thing, now=None):
try:
if dates.get("date") < now:
before = True
except:
except RuntimeError:
raise RuntimeError(f"Cannot find date in document:\n {thing}")
return before

Expand Down Expand Up @@ -485,7 +485,7 @@ def is_after(thing, now=None):
try:
if now < dates.get("date"):
after = True
except:
except RuntimeError:
raise RuntimeError(f"Cannot find date in document:\n {thing}")
return after

Expand Down
2 changes: 1 addition & 1 deletion regolith/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

try:
import hglib
except:
except ImportError:
hglib = None


Expand Down

0 comments on commit 35eafda

Please sign in to comment.