Skip to content

Commit

Permalink
Merge pull request #3201 from GeotrekCE/fix_lint_after_pythoncodestyl…
Browse files Browse the repository at this point in the history
…e_new_version

Fix lint E275 with pythoncodestyle upgrade
  • Loading branch information
numahell authored Aug 1, 2022
2 parents 6432dac + f036f63 commit 90e82f1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion geotrek/feedback/management/commands/sync_suricate.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ def handle(self, *args, **options):
if options["statuses"] or has_no_params:
parser.get_statuses()
if has_no_params:
parser.get_alerts(verbosity=verbosity, should_notify=not(no_notification))
parser.get_alerts(verbosity=verbosity, should_notify=not (no_notification))
else:
logger.error("To use this command, please activate setting SURICATE_MANAGEMENT_ENABLED or SURICATE_WORKFLOW_ENABLED.")
4 changes: 2 additions & 2 deletions geotrek/feedback/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def geom_wgs84(self):
@property
def color(self):
default = settings.MAPENTITY_CONFIG.get('MAP_STYLES', {}).get("detail", {}).get("color", "#ffff00")
if not(settings.ENABLE_REPORT_COLORS_PER_STATUS) or self.status is None or self.status.color is None:
if not (settings.ENABLE_REPORT_COLORS_PER_STATUS) or self.status is None or self.status.color is None:
return default
else:
return self.status.color
Expand Down Expand Up @@ -531,7 +531,7 @@ def is_linked_report_late(self):
return (timezone.now() > self.deadline) and (self.report.status.identifier == self.step.identifier)

def notify_if_needed(self):
if not(self.notification_sent) and self.is_linked_report_late():
if not (self.notification_sent) and self.is_linked_report_late():
self.report.notify_late_report(self.step.identifier)
late_status = ReportStatus.objects.get(identifier=STATUS_WHEN_REPORT_IS_LATE[self.step.identifier])
self.report.status = late_status
Expand Down
4 changes: 2 additions & 2 deletions geotrek/maintenance/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ def get_form_kwargs(self):
if kwargs['can_delete']:
intervention = self.get_object()
# Disallow deletion if this intervention is part of Suricate Workflow at the moment
not_workflow = not(settings.SURICATE_WORKFLOW_ENABLED)
not_workflow = not (settings.SURICATE_WORKFLOW_ENABLED)
is_report = intervention.target and intervention.target.__class__.__name__ == "Report"
report_is_closed = False
if is_report:
report_is_closed = (intervention.target.status.identifier == 'solved')
kwargs["can_delete"] = not_workflow or not(is_report) or report_is_closed
kwargs["can_delete"] = not_workflow or not (is_report) or report_is_closed
return kwargs


Expand Down
2 changes: 1 addition & 1 deletion geotrek/outdoor/templatetags/outdoor_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def course_sites():
str(scale.pk): scale.name
for scale in site.practice.rating_scales.all()
},
} if not(site.practice is None) else {'practice': None, 'types': {}, 'scales': {}}
} if not (site.practice is None) else {'practice': None, 'types': {}, 'scales': {}}
for site in Site.objects.all()
}
return json.dumps(sites)
Expand Down

0 comments on commit 90e82f1

Please sign in to comment.