Used more augmented assignment statements.

Identified using the following command:

$ git grep -I '\(\<[_a-zA-Z0-9]\+\>\) *= *\1 *[-+/*^%&|<>@]'
This commit is contained in:
Nick Pope 2022-01-28 20:15:53 +00:00 committed by Mariusz Felisiak
parent a320aab512
commit d3cb91db87
28 changed files with 47 additions and 50 deletions

View file

@ -134,7 +134,7 @@ def _sqlite_date_trunc(lookup_type, dt, tzname, conn_tzname):
elif lookup_type == "month":
return f"{dt.year:04d}-{dt.month:02d}-01"
elif lookup_type == "week":
dt = dt - timedelta(days=dt.weekday())
dt -= timedelta(days=dt.weekday())
return f"{dt.year:04d}-{dt.month:02d}-{dt.day:02d}"
elif lookup_type == "day":
return f"{dt.year:04d}-{dt.month:02d}-{dt.day:02d}"
@ -205,7 +205,7 @@ def _sqlite_datetime_trunc(lookup_type, dt, tzname, conn_tzname):
elif lookup_type == "month":
return f"{dt.year:04d}-{dt.month:02d}-01 00:00:00"
elif lookup_type == "week":
dt = dt - timedelta(days=dt.weekday())
dt -= timedelta(days=dt.weekday())
return f"{dt.year:04d}-{dt.month:02d}-{dt.day:02d} 00:00:00"
elif lookup_type == "day":
return f"{dt.year:04d}-{dt.month:02d}-{dt.day:02d} 00:00:00"