From 0c7510c1a8759b06aec69fe0206339c027352982 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 26 Oct 2018 13:27:54 -0400 Subject: [PATCH] PEP8 cleanup --- netbox/dcim/constants.py | 2 +- netbox/dcim/models.py | 2 +- netbox/dcim/querysets.py | 6 +++--- netbox/dcim/views.py | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/netbox/dcim/constants.py b/netbox/dcim/constants.py index b5ceb5e3d..f10900812 100644 --- a/netbox/dcim/constants.py +++ b/netbox/dcim/constants.py @@ -327,4 +327,4 @@ LENGTH_UNIT_CHOICES = ( (LENGTH_UNIT_CENTIMETER, 'Centimeters'), (LENGTH_UNIT_FOOT, 'Feet'), (LENGTH_UNIT_INCH, 'Inches'), -) \ No newline at end of file +) diff --git a/netbox/dcim/models.py b/netbox/dcim/models.py index 0f0bb7a1b..bc2dbc88b 100644 --- a/netbox/dcim/models.py +++ b/netbox/dcim/models.py @@ -2427,7 +2427,7 @@ class Cable(ChangeLoggedModel): rear_port=termination, rear_port_position=position, ) - position=1 + position = 1 # Termination is not a pass-through port, so we've reached the end of the path else: diff --git a/netbox/dcim/querysets.py b/netbox/dcim/querysets.py index 375699bd7..9e1248e00 100644 --- a/netbox/dcim/querysets.py +++ b/netbox/dcim/querysets.py @@ -79,6 +79,6 @@ class CableQuerySet(QuerySet): """ content_type = ContentType.objects.get_for_model(termination) return self.filter( - Q(termination_a_type=content_type, termination_a_id=termination.pk) | - Q(termination_b_type=content_type, termination_b_id=termination.pk) - ).first() + Q(termination_a_type=content_type, termination_a_id=termination.pk) | + Q(termination_b_type=content_type, termination_b_id=termination.pk) + ).first() diff --git a/netbox/dcim/views.py b/netbox/dcim/views.py index d3d455899..57971b5e3 100644 --- a/netbox/dcim/views.py +++ b/netbox/dcim/views.py @@ -2063,7 +2063,6 @@ class CableDeleteView(PermissionRequiredMixin, ObjectDeleteView): default_return_url = 'dcim:cable_list' - # # Connections #