mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-06 00:32:08 +02:00
Merge pull request #21503 from netbox-community/21500-enable-linting-for-all-ordering-ruf022
Closes #21500: Enable RUF022 to enforce sorted `__all__` lists
This commit is contained in:
@@ -29,9 +29,9 @@ from tenancy.api.serializers_.tenants import TenantSerializer
|
||||
from .providers import ProviderAccountSerializer, ProviderNetworkSerializer, ProviderSerializer
|
||||
|
||||
__all__ = (
|
||||
'CircuitSerializer',
|
||||
'CircuitGroupAssignmentSerializer',
|
||||
'CircuitGroupSerializer',
|
||||
'CircuitSerializer',
|
||||
'CircuitTerminationSerializer',
|
||||
'CircuitTypeSerializer',
|
||||
'VirtualCircuitSerializer',
|
||||
|
||||
@@ -25,9 +25,9 @@ __all__ = (
|
||||
'CircuitGroupFilterSet',
|
||||
'CircuitTerminationFilterSet',
|
||||
'CircuitTypeFilterSet',
|
||||
'ProviderNetworkFilterSet',
|
||||
'ProviderAccountFilterSet',
|
||||
'ProviderFilterSet',
|
||||
'ProviderNetworkFilterSet',
|
||||
'VirtualCircuitFilterSet',
|
||||
'VirtualCircuitTerminationFilterSet',
|
||||
'VirtualCircuitTypeFilterSet',
|
||||
|
||||
@@ -33,8 +33,8 @@ __all__ = (
|
||||
'CircuitGroupBulkEditForm',
|
||||
'CircuitTerminationBulkEditForm',
|
||||
'CircuitTypeBulkEditForm',
|
||||
'ProviderBulkEditForm',
|
||||
'ProviderAccountBulkEditForm',
|
||||
'ProviderBulkEditForm',
|
||||
'ProviderNetworkBulkEditForm',
|
||||
'VirtualCircuitBulkEditForm',
|
||||
'VirtualCircuitTerminationBulkEditForm',
|
||||
|
||||
@@ -12,14 +12,14 @@ from tenancy.models import Tenant
|
||||
from utilities.forms.fields import CSVChoiceField, CSVContentTypeField, CSVModelChoiceField, SlugField
|
||||
|
||||
__all__ = (
|
||||
'CircuitImportForm',
|
||||
'CircuitGroupAssignmentImportForm',
|
||||
'CircuitGroupImportForm',
|
||||
'CircuitImportForm',
|
||||
'CircuitTerminationImportForm',
|
||||
'CircuitTerminationImportRelatedForm',
|
||||
'CircuitTypeImportForm',
|
||||
'ProviderImportForm',
|
||||
'ProviderAccountImportForm',
|
||||
'ProviderImportForm',
|
||||
'ProviderNetworkImportForm',
|
||||
'VirtualCircuitImportForm',
|
||||
'VirtualCircuitTerminationImportForm',
|
||||
|
||||
@@ -25,8 +25,8 @@ __all__ = (
|
||||
'CircuitGroupFilterForm',
|
||||
'CircuitTerminationFilterForm',
|
||||
'CircuitTypeFilterForm',
|
||||
'ProviderFilterForm',
|
||||
'ProviderAccountFilterForm',
|
||||
'ProviderFilterForm',
|
||||
'ProviderNetworkFilterForm',
|
||||
'VirtualCircuitFilterForm',
|
||||
'VirtualCircuitTerminationFilterForm',
|
||||
|
||||
@@ -32,8 +32,8 @@ __all__ = (
|
||||
'CircuitGroupForm',
|
||||
'CircuitTerminationForm',
|
||||
'CircuitTypeForm',
|
||||
'ProviderForm',
|
||||
'ProviderAccountForm',
|
||||
'ProviderForm',
|
||||
'ProviderNetworkForm',
|
||||
'VirtualCircuitForm',
|
||||
'VirtualCircuitTerminationForm',
|
||||
|
||||
@@ -3,9 +3,9 @@ import strawberry
|
||||
from circuits.choices import *
|
||||
|
||||
__all__ = (
|
||||
'CircuitPriorityEnum',
|
||||
'CircuitStatusEnum',
|
||||
'CircuitTerminationSideEnum',
|
||||
'CircuitPriorityEnum',
|
||||
'VirtualCircuitTerminationRoleEnum',
|
||||
)
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ __all__ = (
|
||||
'CircuitGroupFilter',
|
||||
'CircuitTerminationFilter',
|
||||
'CircuitTypeFilter',
|
||||
'ProviderFilter',
|
||||
'ProviderAccountFilter',
|
||||
'ProviderFilter',
|
||||
'ProviderNetworkFilter',
|
||||
'VirtualCircuitFilter',
|
||||
'VirtualCircuitTerminationFilter',
|
||||
|
||||
@@ -21,9 +21,9 @@ __all__ = (
|
||||
'CircuitTerminationType',
|
||||
'CircuitType',
|
||||
'CircuitTypeType',
|
||||
'ProviderType',
|
||||
'ProviderAccountType',
|
||||
'ProviderNetworkType',
|
||||
'ProviderType',
|
||||
'VirtualCircuitTerminationType',
|
||||
'VirtualCircuitType',
|
||||
'VirtualCircuitTypeType',
|
||||
|
||||
@@ -6,9 +6,9 @@ from netbox.models import PrimaryModel
|
||||
from netbox.models.features import ContactsMixin
|
||||
|
||||
__all__ = (
|
||||
'ProviderNetwork',
|
||||
'Provider',
|
||||
'ProviderAccount',
|
||||
'ProviderNetwork',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ from netbox.tables import PrimaryModelTable, columns
|
||||
from tenancy.tables import ContactsColumnMixin
|
||||
|
||||
__all__ = (
|
||||
'ProviderTable',
|
||||
'ProviderAccountTable',
|
||||
'ProviderNetworkTable',
|
||||
'ProviderTable',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ from rest_framework import serializers
|
||||
from rest_framework.reverse import reverse
|
||||
|
||||
__all__ = (
|
||||
'BackgroundTaskSerializer',
|
||||
'BackgroundQueueSerializer',
|
||||
'BackgroundTaskSerializer',
|
||||
'BackgroundWorkerSerializer',
|
||||
)
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ if TYPE_CHECKING:
|
||||
from users.graphql.filters import UserFilter
|
||||
|
||||
__all__ = (
|
||||
'ContentTypeFilter',
|
||||
'DataFileFilter',
|
||||
'DataSourceFilter',
|
||||
'ObjectChangeFilter',
|
||||
'ContentTypeFilter',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@ from .models import *
|
||||
|
||||
__all__ = (
|
||||
'CableFilterSet',
|
||||
'CabledObjectFilterSet',
|
||||
'CableTerminationFilterSet',
|
||||
'CabledObjectFilterSet',
|
||||
'CommonInterfaceFilterSet',
|
||||
'ConsoleConnectionFilterSet',
|
||||
'ConsolePortFilterSet',
|
||||
|
||||
@@ -48,9 +48,9 @@ __all__ = (
|
||||
'LocationBulkEditForm',
|
||||
'MACAddressBulkEditForm',
|
||||
'ManufacturerBulkEditForm',
|
||||
'ModuleBulkEditForm',
|
||||
'ModuleBayBulkEditForm',
|
||||
'ModuleBayTemplateBulkEditForm',
|
||||
'ModuleBulkEditForm',
|
||||
'ModuleTypeBulkEditForm',
|
||||
'ModuleTypeProfileBulkEditForm',
|
||||
'PlatformBulkEditForm',
|
||||
|
||||
@@ -48,8 +48,8 @@ __all__ = (
|
||||
'LocationImportForm',
|
||||
'MACAddressImportForm',
|
||||
'ManufacturerImportForm',
|
||||
'ModuleImportForm',
|
||||
'ModuleBayImportForm',
|
||||
'ModuleImportForm',
|
||||
'ModuleTypeImportForm',
|
||||
'ModuleTypeProfileImportForm',
|
||||
'PlatformImportForm',
|
||||
@@ -63,8 +63,8 @@ __all__ = (
|
||||
'RackTypeImportForm',
|
||||
'RearPortImportForm',
|
||||
'RegionImportForm',
|
||||
'SiteImportForm',
|
||||
'SiteGroupImportForm',
|
||||
'SiteImportForm',
|
||||
'VirtualChassisImportForm',
|
||||
'VirtualDeviceContextImportForm'
|
||||
)
|
||||
|
||||
@@ -44,14 +44,14 @@ __all__ = (
|
||||
'InterfaceFilterForm',
|
||||
'InterfaceTemplateFilterForm',
|
||||
'InventoryItemFilterForm',
|
||||
'InventoryItemTemplateFilterForm',
|
||||
'InventoryItemRoleFilterForm',
|
||||
'InventoryItemTemplateFilterForm',
|
||||
'LocationFilterForm',
|
||||
'MACAddressFilterForm',
|
||||
'ManufacturerFilterForm',
|
||||
'ModuleFilterForm',
|
||||
'ModuleBayFilterForm',
|
||||
'ModuleBayTemplateFilterForm',
|
||||
'ModuleFilterForm',
|
||||
'ModuleTypeFilterForm',
|
||||
'ModuleTypeProfileFilterForm',
|
||||
'PlatformFilterForm',
|
||||
@@ -62,8 +62,8 @@ __all__ = (
|
||||
'PowerPanelFilterForm',
|
||||
'PowerPortFilterForm',
|
||||
'PowerPortTemplateFilterForm',
|
||||
'RackFilterForm',
|
||||
'RackElevationFilterForm',
|
||||
'RackFilterForm',
|
||||
'RackReservationFilterForm',
|
||||
'RackRoleFilterForm',
|
||||
'RackTypeFilterForm',
|
||||
|
||||
@@ -60,9 +60,9 @@ __all__ = (
|
||||
'LocationForm',
|
||||
'MACAddressForm',
|
||||
'ManufacturerForm',
|
||||
'ModuleForm',
|
||||
'ModuleBayForm',
|
||||
'ModuleBayTemplateForm',
|
||||
'ModuleForm',
|
||||
'ModuleTypeForm',
|
||||
'ModuleTypeProfileForm',
|
||||
'PlatformForm',
|
||||
|
||||
@@ -63,9 +63,9 @@ __all__ = (
|
||||
'ConsolePortTemplateFilter',
|
||||
'ConsoleServerPortFilter',
|
||||
'ConsoleServerPortTemplateFilter',
|
||||
'DeviceFilter',
|
||||
'DeviceBayFilter',
|
||||
'DeviceBayTemplateFilter',
|
||||
'DeviceFilter',
|
||||
'DeviceRoleFilter',
|
||||
'DeviceTypeFilter',
|
||||
'FrontPortFilter',
|
||||
@@ -78,9 +78,9 @@ __all__ = (
|
||||
'LocationFilter',
|
||||
'MACAddressFilter',
|
||||
'ManufacturerFilter',
|
||||
'ModuleFilter',
|
||||
'ModuleBayFilter',
|
||||
'ModuleBayTemplateFilter',
|
||||
'ModuleFilter',
|
||||
'ModuleTypeFilter',
|
||||
'ModuleTypeProfileFilter',
|
||||
'PlatformFilter',
|
||||
|
||||
@@ -41,47 +41,47 @@ if TYPE_CHECKING:
|
||||
__all__ = (
|
||||
'CableType',
|
||||
'ComponentType',
|
||||
'ConsolePortType',
|
||||
'ConsolePortTemplateType',
|
||||
'ConsoleServerPortType',
|
||||
'ConsolePortType',
|
||||
'ConsoleServerPortTemplateType',
|
||||
'DeviceType',
|
||||
'DeviceBayType',
|
||||
'ConsoleServerPortType',
|
||||
'DeviceBayTemplateType',
|
||||
'DeviceBayType',
|
||||
'DeviceRoleType',
|
||||
'DeviceType',
|
||||
'DeviceTypeType',
|
||||
'FrontPortType',
|
||||
'FrontPortTemplateType',
|
||||
'InterfaceType',
|
||||
'FrontPortType',
|
||||
'InterfaceTemplateType',
|
||||
'InventoryItemType',
|
||||
'InterfaceType',
|
||||
'InventoryItemRoleType',
|
||||
'InventoryItemTemplateType',
|
||||
'InventoryItemType',
|
||||
'LocationType',
|
||||
'MACAddressType',
|
||||
'ManufacturerType',
|
||||
'ModularComponentType',
|
||||
'ModuleType',
|
||||
'ModuleBayType',
|
||||
'ModuleBayTemplateType',
|
||||
'ModuleBayType',
|
||||
'ModuleType',
|
||||
'ModuleTypeProfileType',
|
||||
'ModuleTypeType',
|
||||
'PlatformType',
|
||||
'PowerFeedType',
|
||||
'PowerOutletType',
|
||||
'PowerOutletTemplateType',
|
||||
'PowerOutletType',
|
||||
'PowerPanelType',
|
||||
'PowerPortType',
|
||||
'PowerPortTemplateType',
|
||||
'RackType',
|
||||
'PowerPortType',
|
||||
'RackReservationType',
|
||||
'RackRoleType',
|
||||
'RackType',
|
||||
'RackTypeType',
|
||||
'RearPortType',
|
||||
'RearPortTemplateType',
|
||||
'RearPortType',
|
||||
'RegionType',
|
||||
'SiteType',
|
||||
'SiteGroupType',
|
||||
'SiteType',
|
||||
'VirtualChassisType',
|
||||
'VirtualDeviceContextType',
|
||||
)
|
||||
|
||||
@@ -21,14 +21,14 @@ __all__ = (
|
||||
'DeviceInterfaceTable',
|
||||
'DeviceInventoryItemTable',
|
||||
'DeviceModuleBayTable',
|
||||
'DevicePowerPortTable',
|
||||
'DevicePowerOutletTable',
|
||||
'DevicePowerPortTable',
|
||||
'DeviceRearPortTable',
|
||||
'DeviceRoleTable',
|
||||
'DeviceTable',
|
||||
'FrontPortTable',
|
||||
'InterfaceTable',
|
||||
'InterfaceLAGMemberTable',
|
||||
'InterfaceTable',
|
||||
'InventoryItemRoleTable',
|
||||
'InventoryItemTable',
|
||||
'MACAddressTable',
|
||||
|
||||
@@ -9,9 +9,9 @@ from tenancy.tables import ContactsColumnMixin, TenancyColumnsMixin
|
||||
from .template_code import OUTER_UNIT, WEIGHT
|
||||
|
||||
__all__ = (
|
||||
'RackTable',
|
||||
'RackReservationTable',
|
||||
'RackRoleTable',
|
||||
'RackTable',
|
||||
'RackTypeTable',
|
||||
)
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ from .template_code import LOCATION_BUTTONS
|
||||
__all__ = (
|
||||
'LocationTable',
|
||||
'RegionTable',
|
||||
'SiteTable',
|
||||
'SiteGroupTable',
|
||||
'SiteTable',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ from users.api.serializers_.users import GroupSerializer, UserSerializer
|
||||
from users.models import Group, User
|
||||
|
||||
__all__ = (
|
||||
'NotificationSerializer',
|
||||
'NotificationGroupSerializer',
|
||||
'NotificationSerializer',
|
||||
'SubscriptionSerializer',
|
||||
)
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ if TYPE_CHECKING:
|
||||
from .filters import *
|
||||
|
||||
__all__ = (
|
||||
'ConfigContextFilterMixin',
|
||||
'CustomFieldsFilterMixin',
|
||||
'JournalEntriesFilterMixin',
|
||||
'TagsFilterMixin',
|
||||
'ConfigContextFilterMixin',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ __all__ = (
|
||||
'ConfigContextFilter',
|
||||
'ConfigContextProfileFilter',
|
||||
'ConfigTemplateFilter',
|
||||
'CustomFieldFilter',
|
||||
'CustomFieldChoiceSetFilter',
|
||||
'CustomFieldFilter',
|
||||
'CustomLinkFilter',
|
||||
'EventRuleFilter',
|
||||
'ExportTemplateFilter',
|
||||
|
||||
@@ -24,14 +24,14 @@ __all__ = (
|
||||
'BaseScript',
|
||||
'BooleanVar',
|
||||
'ChoiceVar',
|
||||
'DateVar',
|
||||
'DateTimeVar',
|
||||
'FileVar',
|
||||
'IntegerVar',
|
||||
'DateVar',
|
||||
'DecimalVar',
|
||||
'FileVar',
|
||||
'IPAddressVar',
|
||||
'IPAddressWithMaskVar',
|
||||
'IPNetworkVar',
|
||||
'IntegerVar',
|
||||
'MultiChoiceVar',
|
||||
'MultiObjectVar',
|
||||
'ObjectVar',
|
||||
|
||||
@@ -28,14 +28,14 @@ __all__ = (
|
||||
'JournalEntryTable',
|
||||
'NotificationGroupTable',
|
||||
'NotificationTable',
|
||||
'SavedFilterTable',
|
||||
'ReportResultsTable',
|
||||
'ScriptResultsTable',
|
||||
'SavedFilterTable',
|
||||
'ScriptJobTable',
|
||||
'ScriptResultsTable',
|
||||
'SubscriptionTable',
|
||||
'TableConfigTable',
|
||||
'TaggedItemTable',
|
||||
'TagTable',
|
||||
'TaggedItemTable',
|
||||
'WebhookTable',
|
||||
)
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ from .vrfs import VRFSerializer
|
||||
|
||||
__all__ = (
|
||||
'AggregateSerializer',
|
||||
'AvailableIPSerializer',
|
||||
'AvailableIPRequestSerializer',
|
||||
'AvailableIPSerializer',
|
||||
'AvailablePrefixSerializer',
|
||||
'IPAddressSerializer',
|
||||
'IPRangeSerializer',
|
||||
|
||||
@@ -33,9 +33,9 @@ from .choices import *
|
||||
from .models import *
|
||||
|
||||
__all__ = (
|
||||
'AggregateFilterSet',
|
||||
'ASNFilterSet',
|
||||
'ASNRangeFilterSet',
|
||||
'AggregateFilterSet',
|
||||
'FHRPGroupAssignmentFilterSet',
|
||||
'FHRPGroupFilterSet',
|
||||
'IPAddressFilterSet',
|
||||
|
||||
@@ -24,9 +24,9 @@ from utilities.forms.widgets import BulkEditNullBooleanSelect, HTMXSelect
|
||||
from utilities.templatetags.builtins.filters import bettertitle
|
||||
|
||||
__all__ = (
|
||||
'AggregateBulkEditForm',
|
||||
'ASNBulkEditForm',
|
||||
'ASNRangeBulkEditForm',
|
||||
'AggregateBulkEditForm',
|
||||
'FHRPGroupBulkEditForm',
|
||||
'IPAddressBulkEditForm',
|
||||
'IPRangeBulkEditForm',
|
||||
|
||||
@@ -20,9 +20,9 @@ from utilities.forms.fields import (
|
||||
from virtualization.models import VirtualMachine, VMInterface
|
||||
|
||||
__all__ = (
|
||||
'AggregateImportForm',
|
||||
'ASNImportForm',
|
||||
'ASNRangeImportForm',
|
||||
'AggregateImportForm',
|
||||
'FHRPGroupImportForm',
|
||||
'IPAddressImportForm',
|
||||
'IPRangeImportForm',
|
||||
@@ -32,8 +32,8 @@ __all__ = (
|
||||
'RouteTargetImportForm',
|
||||
'ServiceImportForm',
|
||||
'ServiceTemplateImportForm',
|
||||
'VLANImportForm',
|
||||
'VLANGroupImportForm',
|
||||
'VLANImportForm',
|
||||
'VLANTranslationPolicyImportForm',
|
||||
'VLANTranslationRuleImportForm',
|
||||
'VRFImportForm',
|
||||
|
||||
@@ -14,9 +14,9 @@ from virtualization.models import Cluster, ClusterGroup, VirtualMachine
|
||||
from vpn.models import L2VPN
|
||||
|
||||
__all__ = (
|
||||
'AggregateFilterForm',
|
||||
'ASNFilterForm',
|
||||
'ASNRangeFilterForm',
|
||||
'AggregateFilterForm',
|
||||
'FHRPGroupFilterForm',
|
||||
'IPAddressFilterForm',
|
||||
'IPRangeFilterForm',
|
||||
|
||||
@@ -28,11 +28,11 @@ from utilities.templatetags.builtins.filters import bettertitle
|
||||
from virtualization.models import VirtualMachine, VMInterface
|
||||
|
||||
__all__ = (
|
||||
'AggregateForm',
|
||||
'ASNForm',
|
||||
'ASNRangeForm',
|
||||
'FHRPGroupForm',
|
||||
'AggregateForm',
|
||||
'FHRPGroupAssignmentForm',
|
||||
'FHRPGroupForm',
|
||||
'IPAddressAssignForm',
|
||||
'IPAddressBulkAddForm',
|
||||
'IPAddressForm',
|
||||
@@ -41,8 +41,8 @@ __all__ = (
|
||||
'RIRForm',
|
||||
'RoleForm',
|
||||
'RouteTargetForm',
|
||||
'ServiceForm',
|
||||
'ServiceCreateForm',
|
||||
'ServiceForm',
|
||||
'ServiceTemplateForm',
|
||||
'VLANForm',
|
||||
'VLANGroupForm',
|
||||
|
||||
@@ -11,8 +11,8 @@ __all__ = (
|
||||
'IPRangeStatusEnum',
|
||||
'PrefixStatusEnum',
|
||||
'ServiceProtocolEnum',
|
||||
'VLANStatusEnum',
|
||||
'VLANQinQRoleEnum',
|
||||
'VLANStatusEnum',
|
||||
)
|
||||
|
||||
FHRPGroupAuthTypeEnum = strawberry.enum(FHRPGroupAuthTypeChoices.as_enum(prefix='authentication'))
|
||||
|
||||
@@ -35,8 +35,8 @@ __all__ = (
|
||||
'ASNFilter',
|
||||
'ASNRangeFilter',
|
||||
'AggregateFilter',
|
||||
'FHRPGroupFilter',
|
||||
'FHRPGroupAssignmentFilter',
|
||||
'FHRPGroupFilter',
|
||||
'IPAddressFilter',
|
||||
'IPRangeFilter',
|
||||
'PrefixFilter',
|
||||
|
||||
@@ -28,23 +28,23 @@ if TYPE_CHECKING:
|
||||
from wireless.graphql.types import WirelessLANType
|
||||
|
||||
__all__ = (
|
||||
'ASNType',
|
||||
'ASNRangeType',
|
||||
'ASNType',
|
||||
'AggregateType',
|
||||
'FHRPGroupType',
|
||||
'FHRPGroupAssignmentType',
|
||||
'FHRPGroupType',
|
||||
'IPAddressType',
|
||||
'IPRangeType',
|
||||
'PrefixType',
|
||||
'RIRType',
|
||||
'RoleType',
|
||||
'RouteTargetType',
|
||||
'ServiceType',
|
||||
'ServiceTemplateType',
|
||||
'VLANType',
|
||||
'ServiceType',
|
||||
'VLANGroupType',
|
||||
'VLANTranslationPolicyType',
|
||||
'VLANTranslationRuleType',
|
||||
'VLANType',
|
||||
'VRFType',
|
||||
)
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ from netbox.models import OrganizationalModel, PrimaryModel
|
||||
from netbox.models.features import ContactsMixin
|
||||
|
||||
__all__ = (
|
||||
'RIR',
|
||||
'Aggregate',
|
||||
'IPAddress',
|
||||
'IPRange',
|
||||
'Prefix',
|
||||
'RIR',
|
||||
'Role',
|
||||
)
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ from ipam.constants import *
|
||||
from netbox.models import PrimaryModel
|
||||
|
||||
__all__ = (
|
||||
'RouteTarget',
|
||||
'VRF',
|
||||
'RouteTarget',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ from netbox.tables import OrganizationalModelTable, PrimaryModelTable, columns
|
||||
from tenancy.tables import ContactsColumnMixin, TenancyColumnsMixin
|
||||
|
||||
__all__ = (
|
||||
'ASNTable',
|
||||
'ASNRangeTable',
|
||||
'ASNTable',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ from ipam.models import *
|
||||
from netbox.tables import NetBoxTable, PrimaryModelTable, columns
|
||||
|
||||
__all__ = (
|
||||
'FHRPGroupTable',
|
||||
'FHRPGroupAssignmentTable',
|
||||
'FHRPGroupTable',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ __all__ = (
|
||||
'VLANGroupTable',
|
||||
'VLANMembersTable',
|
||||
'VLANTable',
|
||||
'VLANVirtualMachinesTable',
|
||||
'VLANTranslationPolicyTable',
|
||||
'VLANTranslationRuleTable',
|
||||
'VLANVirtualMachinesTable',
|
||||
)
|
||||
|
||||
AVAILABLE_LABEL = mark_safe('<span class="badge text-bg-success">Available</span>')
|
||||
|
||||
@@ -19,8 +19,8 @@ from utilities.query import reapply_model_ordering
|
||||
from . import mixins
|
||||
|
||||
__all__ = (
|
||||
'NetBoxReadOnlyModelViewSet',
|
||||
'NetBoxModelViewSet',
|
||||
'NetBoxReadOnlyModelViewSet',
|
||||
)
|
||||
|
||||
HTTP_ACTIONS = {
|
||||
|
||||
@@ -5,8 +5,8 @@ from utilities.constants import CSV_DELIMITERS
|
||||
|
||||
__all__ = (
|
||||
'ButtonColorChoices',
|
||||
'ColorChoices',
|
||||
'CSVDelimiterChoices',
|
||||
'ColorChoices',
|
||||
'DistanceUnitChoices',
|
||||
'ImportFormatChoices',
|
||||
'ImportMethodChoices',
|
||||
|
||||
@@ -9,10 +9,10 @@ from django.utils.translation import gettext_lazy as _
|
||||
from .parameters import PARAMS
|
||||
|
||||
__all__ = (
|
||||
'clear_config',
|
||||
'ConfigItem',
|
||||
'get_config',
|
||||
'PARAMS',
|
||||
'ConfigItem',
|
||||
'clear_config',
|
||||
'get_config',
|
||||
)
|
||||
|
||||
_thread_locals = threading.local()
|
||||
|
||||
@@ -13,9 +13,9 @@ __all__ = (
|
||||
'EVENT_TYPE_KIND_SUCCESS',
|
||||
'EVENT_TYPE_KIND_WARNING',
|
||||
'EventType',
|
||||
'get_event_text',
|
||||
'get_event_type',
|
||||
'get_event_type_choices',
|
||||
'get_event_text',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ from utilities.forms.fields import DynamicModelChoiceField, DynamicModelMultiple
|
||||
__all__ = (
|
||||
'ChangelogMessageMixin',
|
||||
'CustomFieldsMixin',
|
||||
'OwnerMixin',
|
||||
'OwnerFilterMixin',
|
||||
'OwnerMixin',
|
||||
'SavedFiltersMixin',
|
||||
'TagsMixin',
|
||||
)
|
||||
|
||||
@@ -4,12 +4,12 @@ from dataclasses import dataclass
|
||||
from django.urls import reverse_lazy
|
||||
|
||||
__all__ = (
|
||||
'get_model_item',
|
||||
'get_model_buttons',
|
||||
'Menu',
|
||||
'MenuGroup',
|
||||
'MenuItem',
|
||||
'MenuItemButton',
|
||||
'get_model_buttons',
|
||||
'get_model_item',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@ __all__ = (
|
||||
'DistanceColumn',
|
||||
'DurationColumn',
|
||||
'LinkedCountColumn',
|
||||
'MarkdownColumn',
|
||||
'ManyToManyColumn',
|
||||
'MPTTColumn',
|
||||
'ManyToManyColumn',
|
||||
'MarkdownColumn',
|
||||
'TagColumn',
|
||||
'TemplateColumn',
|
||||
'ToggleColumn',
|
||||
|
||||
@@ -8,10 +8,10 @@ from utilities.data import resolve_attr_path
|
||||
__all__ = (
|
||||
'AddressAttr',
|
||||
'BooleanAttr',
|
||||
'ColorAttr',
|
||||
'ChoiceAttr',
|
||||
'GenericForeignKeyAttr',
|
||||
'ColorAttr',
|
||||
'GPSCoordinatesAttr',
|
||||
'GenericForeignKeyAttr',
|
||||
'ImageAttr',
|
||||
'NestedObjectAttr',
|
||||
'NumericAttr',
|
||||
|
||||
@@ -13,9 +13,9 @@ from django.views.generic import View
|
||||
from netbox.plugins.utils import get_installed_plugins
|
||||
|
||||
__all__ = (
|
||||
'StaticMediaFailureView',
|
||||
'handler_404',
|
||||
'handler_500',
|
||||
'StaticMediaFailureView',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ from django.views.generic import View
|
||||
from utilities.views import ObjectPermissionRequiredMixin
|
||||
|
||||
__all__ = (
|
||||
'BaseObjectView',
|
||||
'BaseMultiObjectView',
|
||||
'BaseObjectView',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@ from ..models import *
|
||||
|
||||
__all__ = (
|
||||
'ContactAssignmentImportForm',
|
||||
'ContactImportForm',
|
||||
'ContactGroupImportForm',
|
||||
'ContactImportForm',
|
||||
'ContactRoleImportForm',
|
||||
'TenantImportForm',
|
||||
'TenantGroupImportForm',
|
||||
'TenantImportForm',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ from ..models import *
|
||||
|
||||
__all__ = (
|
||||
'ContactModelFilterForm',
|
||||
'TenancyForm',
|
||||
'TenancyFilterForm',
|
||||
'TenancyForm',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -49,12 +49,12 @@ if TYPE_CHECKING:
|
||||
from .enums import *
|
||||
|
||||
__all__ = (
|
||||
'ContactAssignmentFilter',
|
||||
'ContactFilter',
|
||||
'ContactGroupFilter',
|
||||
'ContactRoleFilter',
|
||||
'TenantFilter',
|
||||
'TenantGroupFilter',
|
||||
'ContactFilter',
|
||||
'ContactRoleFilter',
|
||||
'ContactGroupFilter',
|
||||
'ContactAssignmentFilter',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ __all__ = (
|
||||
'ContactGroupType',
|
||||
'ContactRoleType',
|
||||
'ContactType',
|
||||
'TenantType',
|
||||
'TenantGroupType',
|
||||
'TenantType',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ from netbox.models.features import CustomFieldsMixin, ExportTemplatesMixin, Tags
|
||||
from tenancy.choices import *
|
||||
|
||||
__all__ = (
|
||||
'ContactAssignment',
|
||||
'Contact',
|
||||
'ContactAssignment',
|
||||
'ContactGroup',
|
||||
'ContactRole',
|
||||
)
|
||||
|
||||
@@ -7,9 +7,9 @@ from .template_code import *
|
||||
|
||||
__all__ = (
|
||||
'ContactsColumnMixin',
|
||||
'TenancyColumnsMixin',
|
||||
'TenantColumn',
|
||||
'TenantGroupColumn',
|
||||
'TenancyColumnsMixin',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ __all__ = (
|
||||
'ObjectPermissionBulkEditForm',
|
||||
'OwnerBulkEditForm',
|
||||
'OwnerGroupBulkEditForm',
|
||||
'UserBulkEditForm',
|
||||
'TokenBulkEditForm',
|
||||
'UserBulkEditForm',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ __all__ = (
|
||||
'GroupImportForm',
|
||||
'OwnerGroupImportForm',
|
||||
'OwnerImportForm',
|
||||
'UserImportForm',
|
||||
'TokenImportForm',
|
||||
'UserImportForm',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ __all__ = (
|
||||
'BulkDeleteForm',
|
||||
'BulkEditForm',
|
||||
'BulkRenameForm',
|
||||
'ConfirmationForm',
|
||||
'CSVModelForm',
|
||||
'ConfirmationForm',
|
||||
'DeleteForm',
|
||||
'FilterForm',
|
||||
'TableConfigForm',
|
||||
|
||||
@@ -11,11 +11,11 @@ from utilities.forms.widgets import FilterModifierWidget
|
||||
from utilities.forms.widgets.modifiers import MODIFIER_EMPTY_FALSE, MODIFIER_EMPTY_TRUE
|
||||
|
||||
__all__ = (
|
||||
'FORM_FIELD_LOOKUPS',
|
||||
'BackgroundJobMixin',
|
||||
'CheckLastUpdatedMixin',
|
||||
'DistanceValidationMixin',
|
||||
'FilterModifierMixin',
|
||||
'FORM_FIELD_LOOKUPS',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ __all__ = (
|
||||
'get_field_value',
|
||||
'get_selected_values',
|
||||
'parse_alphanumeric_range',
|
||||
'parse_csv',
|
||||
'parse_numeric_range',
|
||||
'restrict_form_fields',
|
||||
'parse_csv',
|
||||
'validate_csv',
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ from django.utils.translation import gettext_lazy as _
|
||||
from utilities.forms.widgets.apiselect import APISelect, APISelectMultiple
|
||||
|
||||
__all__ = (
|
||||
'FilterModifierWidget',
|
||||
'MODIFIER_EMPTY_FALSE',
|
||||
'MODIFIER_EMPTY_TRUE',
|
||||
'FilterModifierWidget',
|
||||
)
|
||||
|
||||
# Modifier codes for empty/null checking
|
||||
|
||||
@@ -5,8 +5,8 @@ from django.urls import reverse
|
||||
|
||||
__all__ = (
|
||||
'htmx_current_url',
|
||||
'htmx_partial',
|
||||
'htmx_maybe_redirect_current_page',
|
||||
'htmx_partial',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ __all__ = (
|
||||
'checkmark',
|
||||
'copy_content',
|
||||
'customfield_value',
|
||||
'htmx_table',
|
||||
'formaction',
|
||||
'htmx_table',
|
||||
'static_with_params',
|
||||
'tag',
|
||||
)
|
||||
|
||||
@@ -2,8 +2,8 @@ from netbox.api.serializers import WritableNestedSerializer
|
||||
from virtualization import models
|
||||
|
||||
__all__ = (
|
||||
'NestedVirtualMachineSerializer',
|
||||
'NestedVMInterfaceSerializer',
|
||||
'NestedVirtualMachineSerializer',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ __all__ = (
|
||||
'ClusterFilterSet',
|
||||
'ClusterGroupFilterSet',
|
||||
'ClusterTypeFilterSet',
|
||||
'VMInterfaceFilterSet',
|
||||
'VirtualDiskFilterSet',
|
||||
'VirtualMachineFilterSet',
|
||||
'VMInterfaceFilterSet',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ from utilities.forms.fields import ExpandableNameField
|
||||
from virtualization.models import VirtualDisk, VirtualMachine, VMInterface
|
||||
|
||||
__all__ = (
|
||||
'VirtualDiskBulkCreateForm',
|
||||
'VMInterfaceBulkCreateForm',
|
||||
'VirtualDiskBulkCreateForm',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@ __all__ = (
|
||||
'ClusterBulkEditForm',
|
||||
'ClusterGroupBulkEditForm',
|
||||
'ClusterTypeBulkEditForm',
|
||||
'VMInterfaceBulkEditForm',
|
||||
'VMInterfaceBulkRenameForm',
|
||||
'VirtualDiskBulkEditForm',
|
||||
'VirtualDiskBulkRenameForm',
|
||||
'VirtualMachineBulkEditForm',
|
||||
'VMInterfaceBulkEditForm',
|
||||
'VMInterfaceBulkRenameForm',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ from virtualization.choices import *
|
||||
from virtualization.models import *
|
||||
|
||||
__all__ = (
|
||||
'ClusterImportForm',
|
||||
'ClusterGroupImportForm',
|
||||
'ClusterImportForm',
|
||||
'ClusterTypeImportForm',
|
||||
'VMInterfaceImportForm',
|
||||
'VirtualDiskImportForm',
|
||||
'VirtualMachineImportForm',
|
||||
'VMInterfaceImportForm',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ __all__ = (
|
||||
'ClusterFilterForm',
|
||||
'ClusterGroupFilterForm',
|
||||
'ClusterTypeFilterForm',
|
||||
'VMInterfaceFilterForm',
|
||||
'VirtualDiskFilterForm',
|
||||
'VirtualMachineFilterForm',
|
||||
'VMInterfaceFilterForm',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ __all__ = (
|
||||
'ClusterGroupForm',
|
||||
'ClusterRemoveDevicesForm',
|
||||
'ClusterTypeForm',
|
||||
'VMInterfaceForm',
|
||||
'VirtualDiskForm',
|
||||
'VirtualMachineForm',
|
||||
'VMInterfaceForm',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ from utilities.forms.fields import ExpandableNameField
|
||||
from .model_forms import VirtualDiskForm, VMInterfaceForm
|
||||
|
||||
__all__ = (
|
||||
'VirtualDiskCreateForm',
|
||||
'VMInterfaceCreateForm',
|
||||
'VirtualDiskCreateForm',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ __all__ = (
|
||||
'ClusterFilter',
|
||||
'ClusterGroupFilter',
|
||||
'ClusterTypeFilter',
|
||||
'VirtualMachineFilter',
|
||||
'VMInterfaceFilter',
|
||||
'VirtualDiskFilter',
|
||||
'VirtualMachineFilter',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -28,12 +28,12 @@ if TYPE_CHECKING:
|
||||
from tenancy.graphql.types import TenantType
|
||||
|
||||
__all__ = (
|
||||
'ClusterType',
|
||||
'ClusterGroupType',
|
||||
'ClusterType',
|
||||
'ClusterTypeType',
|
||||
'VMInterfaceType',
|
||||
'VirtualDiskType',
|
||||
'VirtualMachineType',
|
||||
'VMInterfaceType',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ from utilities.tracking import TrackingModelMixin
|
||||
from virtualization.choices import *
|
||||
|
||||
__all__ = (
|
||||
'VMInterface',
|
||||
'VirtualDisk',
|
||||
'VirtualMachine',
|
||||
'VMInterface',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ from tenancy.tables import ContactsColumnMixin, TenancyColumnsMixin
|
||||
from virtualization.models import Cluster, ClusterGroup, ClusterType
|
||||
|
||||
__all__ = (
|
||||
'ClusterTable',
|
||||
'ClusterGroupTable',
|
||||
'ClusterTable',
|
||||
'ClusterTypeTable',
|
||||
)
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ from virtualization.models import VirtualDisk, VirtualMachine, VMInterface
|
||||
from .template_code import *
|
||||
|
||||
__all__ = (
|
||||
'VMInterfaceTable',
|
||||
'VirtualDiskTable',
|
||||
'VirtualMachineTable',
|
||||
'VirtualMachineVirtualDiskTable',
|
||||
'VirtualMachineVMInterfaceTable',
|
||||
'VMInterfaceTable',
|
||||
'VirtualMachineVirtualDiskTable',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ __all__ = (
|
||||
'IPSecPolicyViewSet',
|
||||
'IPSecProfileViewSet',
|
||||
'IPSecProposalViewSet',
|
||||
'L2VPNViewSet',
|
||||
'L2VPNTerminationViewSet',
|
||||
'L2VPNViewSet',
|
||||
'TunnelGroupViewSet',
|
||||
'TunnelTerminationViewSet',
|
||||
'TunnelViewSet',
|
||||
|
||||
@@ -18,8 +18,8 @@ __all__ = (
|
||||
'IPSecProposalImportForm',
|
||||
'L2VPNImportForm',
|
||||
'L2VPNTerminationImportForm',
|
||||
'TunnelImportForm',
|
||||
'TunnelGroupImportForm',
|
||||
'TunnelImportForm',
|
||||
'TunnelTerminationImportForm',
|
||||
)
|
||||
|
||||
|
||||
@@ -23,16 +23,16 @@ if TYPE_CHECKING:
|
||||
from .enums import *
|
||||
|
||||
__all__ = (
|
||||
'TunnelGroupFilter',
|
||||
'TunnelTerminationFilter',
|
||||
'TunnelFilter',
|
||||
'IKEProposalFilter',
|
||||
'IKEPolicyFilter',
|
||||
'IPSecProposalFilter',
|
||||
'IKEProposalFilter',
|
||||
'IPSecPolicyFilter',
|
||||
'IPSecProfileFilter',
|
||||
'IPSecProposalFilter',
|
||||
'L2VPNFilter',
|
||||
'L2VPNTerminationFilter',
|
||||
'TunnelFilter',
|
||||
'TunnelGroupFilter',
|
||||
'TunnelTerminationFilter',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ __all__ = (
|
||||
'IPSecPolicyType',
|
||||
'IPSecProfileType',
|
||||
'IPSecProposalType',
|
||||
'L2VPNType',
|
||||
'L2VPNTerminationType',
|
||||
'L2VPNType',
|
||||
'TunnelGroupType',
|
||||
'TunnelTerminationType',
|
||||
'TunnelType',
|
||||
|
||||
@@ -8,8 +8,8 @@ __all__ = (
|
||||
'IKEPolicyTable',
|
||||
'IKEProposalTable',
|
||||
'IPSecPolicyTable',
|
||||
'IPSecProposalTable',
|
||||
'IPSecProfileTable',
|
||||
'IPSecProposalTable',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ from tenancy.tables import ContactsColumnMixin, TenancyColumnsMixin
|
||||
from vpn.models import *
|
||||
|
||||
__all__ = (
|
||||
'TunnelTable',
|
||||
'TunnelGroupTable',
|
||||
'TunnelTable',
|
||||
'TunnelTerminationTable',
|
||||
)
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ from wireless.choices import *
|
||||
from wireless.models import *
|
||||
|
||||
__all__ = (
|
||||
'WirelessLANImportForm',
|
||||
'WirelessLANGroupImportForm',
|
||||
'WirelessLANImportForm',
|
||||
'WirelessLinkImportForm',
|
||||
)
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ if TYPE_CHECKING:
|
||||
from .enums import *
|
||||
|
||||
__all__ = (
|
||||
'WirelessLANGroupFilter',
|
||||
'WirelessLANFilter',
|
||||
'WirelessLANGroupFilter',
|
||||
'WirelessLinkFilter',
|
||||
)
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ if TYPE_CHECKING:
|
||||
from tenancy.graphql.types import TenantType
|
||||
|
||||
__all__ = (
|
||||
'WirelessLANType',
|
||||
'WirelessLANGroupType',
|
||||
'WirelessLANType',
|
||||
'WirelessLinkType',
|
||||
)
|
||||
|
||||
|
||||
25
ruff.toml
25
ruff.toml
@@ -35,20 +35,21 @@ target-version = "py312"
|
||||
# Keeping this explicit makes ruff deterministic.
|
||||
select = ["E4", "E7", "E9", "F"]
|
||||
extend-select = [
|
||||
"E1", # pycodestyle errors: indentation-related (e.g., unexpected/missing indent)
|
||||
"E2", # pycodestyle errors: whitespace-related (e.g., missing whitespace, extra spaces)
|
||||
"E3", # pycodestyle errors: blank lines / spacing around definitions
|
||||
"E501", # pycodestyle: line too long (enforced with `line-length` above)
|
||||
"W", # pycodestyle warnings (various style warnings, often whitespace/newlines)
|
||||
"I", # import sorting (isort-equivalent)
|
||||
"RET", # return semantics (flake8-return family: consistent/explicit returns; remove redundant else/assign before return)
|
||||
"UP", # pyupgrade: modernize syntax for your target Python (e.g., f-strings, built-in generics, newer stdlib idioms)
|
||||
"E1", # pycodestyle errors: indentation-related (e.g., unexpected/missing indent)
|
||||
"E2", # pycodestyle errors: whitespace-related (e.g., missing whitespace, extra spaces)
|
||||
"E3", # pycodestyle errors: blank lines / spacing around definitions
|
||||
"E501", # pycodestyle: line too long (enforced with `line-length` above)
|
||||
"W", # pycodestyle warnings (various style warnings, often whitespace/newlines)
|
||||
"I", # import sorting (isort-equivalent)
|
||||
"RET", # return semantics (flake8-return family: consistent/explicit returns; remove redundant else/assign before return)
|
||||
"UP", # pyupgrade: modernize syntax for your target Python (e.g., f-strings, built-in generics, newer stdlib idioms)
|
||||
"RUF022", # ruff: enforce sorted `__all__` lists
|
||||
]
|
||||
ignore = [
|
||||
"F403", # pyflakes: `from ... import *` used; unable to detect undefined names
|
||||
"F405", # pyflakes: name may be undefined or defined from star imports
|
||||
"RET504", # return: unnecessary assignment before `return` (e.g., `x = expr; return x` -> `return expr`)
|
||||
"UP032", # pyupgrade: prefer f-strings over `str.format(...)`
|
||||
"F403", # pyflakes: `from ... import *` used; unable to detect undefined names
|
||||
"F405", # pyflakes: name may be undefined or defined from star imports
|
||||
"RET504", # return: unnecessary assignment before `return` (e.g., `x = expr; return x` -> `return expr`)
|
||||
"UP032", # pyupgrade: prefer f-strings over `str.format(...)`
|
||||
]
|
||||
preview = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user