Commit 379fca2a authored by James Southern's avatar James Southern

changes to make the linters happy

parent 2ada69b9
......@@ -31,7 +31,6 @@ class SimpleTimePeriod:
"""Initialize a SimpleTimePeriod from a timedelta object."""
self.period = period
# pylint: disable=too-many-arguments
@classmethod
def from_units(
cls,
......@@ -43,20 +42,14 @@ class SimpleTimePeriod:
seconds: int = 0,
) -> "SimpleTimePeriod":
"""Initialize a SimpleTimePeriod from a series of time units."""
# pylint: disable=too-many-arguments
# pylint: enable=too-many-arguments
# pylint: disable=too-many-boolean-expressions
if (
years < 0
or weeks < 0
or days < 0
or hours < 0
or minutes < 0
or seconds < 0
):
if years < 0 or weeks < 0 or days < 0:
raise ValueError("Cannot have negative values")
if hours < 0 or minutes < 0 or seconds < 0:
raise ValueError("Cannot have negative values")
# pylint: enable=too-many-boolean-expressions
days += years * 365
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment