Skip to content

Commit a30197c

Browse files
cclaussdcramer
authored andcommitted
Use double underscore to deliniate element breaks
* (_, stop_time) becomes ignore__stop_time with the dunder showing the separation between tuple elements
1 parent ac24afb commit a30197c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/sentry/tasks/reports.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ def merge_series(target, other, function=operator.add):
154154
return results
155155

156156

157-
def prepare_project_series(start_stop, project, rollup=60 * 60 * 24):
158-
start, stop = start_stop
157+
def prepare_project_series(start__stop, project, rollup=60 * 60 * 24):
158+
start, stop = start__stop
159159
resolution, series = tsdb.get_optimal_rollup_series(start, stop, rollup)
160160
assert resolution == rollup, 'resolution does not match requested value'
161161
clean = functools.partial(clean_series, start, stop, rollup)
@@ -194,11 +194,11 @@ def prepare_project_series(start_stop, project, rollup=60 * 60 * 24):
194194
)
195195

196196

197-
def prepare_project_aggregates(ignore_stop, project):
197+
def prepare_project_aggregates(ignore__stop, project):
198198
# TODO: This needs to return ``None`` for periods that don't have any data
199199
# (because the project is not old enough) and possibly extrapolate for
200200
# periods that only have partial periods.
201-
_, stop = ignore_stop
201+
_, stop = ignore__stop
202202
segments = 4
203203
period = timedelta(days=7)
204204
start = stop - (period * segments)
@@ -283,8 +283,8 @@ def prepare_project_issue_summaries(interval, project):
283283
]
284284

285285

286-
def prepare_project_usage_summary(start_stop, project):
287-
start, stop = start_stop
286+
def prepare_project_usage_summary(start__stop, project):
287+
start, stop = start__stop
288288
return (
289289
tsdb.get_sums(
290290
tsdb.models.project_total_blacklisted,
@@ -302,8 +302,8 @@ def prepare_project_usage_summary(start_stop, project):
302302
)
303303

304304

305-
def get_calendar_range(ignore_stop_time, months):
306-
_, stop_time = ignore_stop_time
305+
def get_calendar_range(ignore__stop_time, months):
306+
_, stop_time = ignore__stop_time
307307
assert (
308308
stop_time.hour, stop_time.minute, stop_time.second, stop_time.microsecond, stop_time.tzinfo,
309309
) == (0, 0, 0, 0, pytz.utc)
@@ -552,8 +552,8 @@ def prepare_organization_report(timestamp, duration, organization_id, dry_run=Fa
552552
)
553553

554554

555-
def fetch_personal_statistics(start_stop, organization, user):
556-
start, stop = start_stop
555+
def fetch_personal_statistics(start__stop, organization, user):
556+
start, stop = start__stop
557557
resolved_issue_ids = Activity.objects.filter(
558558
project__organization_id=organization.id,
559559
user_id=user.id,
@@ -649,8 +649,8 @@ class Skipped(object):
649649
NoReports = object()
650650

651651

652-
def has_valid_aggregates(interval, project_report):
653-
project, report = project_report
652+
def has_valid_aggregates(interval, project__report):
653+
project, report = project__report
654654
return any(bool(value) for value in report.aggregates)
655655

656656

0 commit comments

Comments
 (0)