diff --git a/netbox/dcim/base_filtersets.py b/netbox/dcim/base_filtersets.py index c007c0120d9..df2a6b650f5 100644 --- a/netbox/dcim/base_filtersets.py +++ b/netbox/dcim/base_filtersets.py @@ -53,10 +53,10 @@ class ScopedFilterSet(BaseFilterSet): label=_('Site (slug)'), ) location_id = TreeNodeMultipleChoiceFilter( - queryset=Location.objects.all(), - field_name='_location', - lookup_expr='in', - label=_('Location (ID)'), + queryset=Location.objects.all(), + field_name='_location', + lookup_expr='in', + label=_('Location (ID)'), ) location = TreeNodeMultipleChoiceFilter( queryset=Location.objects.all(), diff --git a/netbox/dcim/filtersets.py b/netbox/dcim/filtersets.py index 90a9993c275..60c3c4d38bc 100644 --- a/netbox/dcim/filtersets.py +++ b/netbox/dcim/filtersets.py @@ -1652,8 +1652,8 @@ def search(self, queryset, name, value): if not value.strip(): return queryset qs_filter = ( - Q(mac_address__icontains=value) | - Q(description__icontains=value) + Q(mac_address__icontains=value) | + Q(description__icontains=value) ) return queryset.filter(qs_filter) diff --git a/netbox/extras/tests/test_customfields.py b/netbox/extras/tests/test_customfields.py index d36477da805..8bae8dfc958 100644 --- a/netbox/extras/tests/test_customfields.py +++ b/netbox/extras/tests/test_customfields.py @@ -660,8 +660,8 @@ def setUpTestData(cls): CustomField( type=CustomFieldTypeChoices.TYPE_BOOLEAN, name='boolean_field', - default=False) - , + default=False + ), CustomField( type=CustomFieldTypeChoices.TYPE_DATE, name='date_field', diff --git a/netbox/ipam/models/vlans.py b/netbox/ipam/models/vlans.py index 4c7f191c9c0..91e39c6d3b6 100644 --- a/netbox/ipam/models/vlans.py +++ b/netbox/ipam/models/vlans.py @@ -361,7 +361,7 @@ class VLANTranslationRule(NetBoxModel): ) local_vid = models.PositiveSmallIntegerField( verbose_name=_('Local VLAN ID'), - validators=( + validators=( MinValueValidator(VLAN_VID_MIN), MaxValueValidator(VLAN_VID_MAX) ), @@ -369,7 +369,7 @@ class VLANTranslationRule(NetBoxModel): ) remote_vid = models.PositiveSmallIntegerField( verbose_name=_('Remote VLAN ID'), - validators=( + validators=( MinValueValidator(VLAN_VID_MIN), MaxValueValidator(VLAN_VID_MAX) ), diff --git a/netbox/virtualization/forms/model_forms.py b/netbox/virtualization/forms/model_forms.py index 9d53c938267..291d6dbe8a9 100644 --- a/netbox/virtualization/forms/model_forms.py +++ b/netbox/virtualization/forms/model_forms.py @@ -150,8 +150,8 @@ def clean(self): for scope_field in ['site', 'location']: device_scope = getattr(device, scope_field) if ( - self.cluster.scope_type.model_class() == apps.get_model('dcim', scope_field) - and device_scope != self.cluster.scope + self.cluster.scope_type.model_class() == apps.get_model('dcim', scope_field) and + device_scope != self.cluster.scope ): raise ValidationError({ 'devices': _(