mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
ruff: Fix PLR6104 Use +=
to perform an augmented assignment directly.
This is a preview rule, not yet enabled by default. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
b96feb34f6
commit
1e9b6445a9
@@ -158,7 +158,7 @@ def process_count_stat(stat: CountStat, fill_to_time: datetime, realm: Realm | N
|
||||
return
|
||||
fill_to_time = min(fill_to_time, dependency_fill_time)
|
||||
|
||||
currently_filled = currently_filled + stat.time_increment
|
||||
currently_filled += stat.time_increment
|
||||
while currently_filled <= fill_to_time:
|
||||
logger.info("START %s %s", stat.property, currently_filled)
|
||||
start = time.time()
|
||||
@@ -166,7 +166,7 @@ def process_count_stat(stat: CountStat, fill_to_time: datetime, realm: Realm | N
|
||||
do_fill_count_stat_at_hour(stat, currently_filled, realm)
|
||||
do_update_fill_state(fill_state, currently_filled, FillState.DONE)
|
||||
end = time.time()
|
||||
currently_filled = currently_filled + stat.time_increment
|
||||
currently_filled += stat.time_increment
|
||||
logger.info("DONE %s (%dms)", stat.property, (end - start) * 1000)
|
||||
|
||||
|
||||
|
@@ -337,7 +337,7 @@ class TestProcessCountStat(AnalyticsTestCase):
|
||||
self.assertEqual(InstallationCount.objects.filter(property=stat.property).count(), 1)
|
||||
|
||||
# clean stat, with update
|
||||
current_time = current_time + self.HOUR
|
||||
current_time += self.HOUR
|
||||
stat = self.make_dummy_count_stat("test stat")
|
||||
process_count_stat(stat, current_time)
|
||||
self.assertFillStateEquals(stat, current_time)
|
||||
|
Reference in New Issue
Block a user