chore: formatting all python files using black formatter (#3366)
This commit is contained in:
parent
4b0d48b290
commit
11f84a986c
235 changed files with 12967 additions and 4168 deletions
|
|
@ -36,7 +36,9 @@ def archive_old_issues():
|
|||
Q(
|
||||
project=project_id,
|
||||
archived_at__isnull=True,
|
||||
updated_at__lte=(timezone.now() - timedelta(days=archive_in * 30)),
|
||||
updated_at__lte=(
|
||||
timezone.now() - timedelta(days=archive_in * 30)
|
||||
),
|
||||
state__group__in=["completed", "cancelled"],
|
||||
),
|
||||
Q(issue_cycle__isnull=True)
|
||||
|
|
@ -46,7 +48,9 @@ def archive_old_issues():
|
|||
),
|
||||
Q(issue_module__isnull=True)
|
||||
| (
|
||||
Q(issue_module__module__target_date__lt=timezone.now().date())
|
||||
Q(
|
||||
issue_module__module__target_date__lt=timezone.now().date()
|
||||
)
|
||||
& Q(issue_module__isnull=False)
|
||||
),
|
||||
).filter(
|
||||
|
|
@ -74,7 +78,9 @@ def archive_old_issues():
|
|||
_ = [
|
||||
issue_activity.delay(
|
||||
type="issue.activity.updated",
|
||||
requested_data=json.dumps({"archived_at": str(archive_at)}),
|
||||
requested_data=json.dumps(
|
||||
{"archived_at": str(archive_at)}
|
||||
),
|
||||
actor_id=str(project.created_by_id),
|
||||
issue_id=issue.id,
|
||||
project_id=project_id,
|
||||
|
|
@ -108,7 +114,9 @@ def close_old_issues():
|
|||
Q(
|
||||
project=project_id,
|
||||
archived_at__isnull=True,
|
||||
updated_at__lte=(timezone.now() - timedelta(days=close_in * 30)),
|
||||
updated_at__lte=(
|
||||
timezone.now() - timedelta(days=close_in * 30)
|
||||
),
|
||||
state__group__in=["backlog", "unstarted", "started"],
|
||||
),
|
||||
Q(issue_cycle__isnull=True)
|
||||
|
|
@ -118,7 +126,9 @@ def close_old_issues():
|
|||
),
|
||||
Q(issue_module__isnull=True)
|
||||
| (
|
||||
Q(issue_module__module__target_date__lt=timezone.now().date())
|
||||
Q(
|
||||
issue_module__module__target_date__lt=timezone.now().date()
|
||||
)
|
||||
& Q(issue_module__isnull=False)
|
||||
),
|
||||
).filter(
|
||||
|
|
@ -131,7 +141,9 @@ def close_old_issues():
|
|||
# Check if Issues
|
||||
if issues:
|
||||
if project.default_state is None:
|
||||
close_state = State.objects.filter(group="cancelled").first()
|
||||
close_state = State.objects.filter(
|
||||
group="cancelled"
|
||||
).first()
|
||||
else:
|
||||
close_state = project.default_state
|
||||
|
||||
|
|
@ -165,4 +177,4 @@ def close_old_issues():
|
|||
if settings.DEBUG:
|
||||
print(e)
|
||||
capture_exception(e)
|
||||
return
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue