Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98

- name: Check conformance to Black standards
uses: psf/black@903bef54aa72e111c034ccec9997aac82bafbacc
uses: psf/black@e015af4a681dd2ac847188b13a81dc4a573d4dcb
with:
options: "--check"
src: "netbox_dhcp"
Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/api/serializers_/dhcp_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from ..nested_serializers import NestedDHCPServerSerializer


__all__ = ("DHCPClusterSerializer",)


Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/api/serializers_/dhcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

from netbox_dhcp.models import DHCPServer, DHCPServerInterface


__all__ = (
"DHCPServerSerializer",
"DHCPServerInterfaceSerializer",
Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/api/serializers_/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
NestedClientClassSerializer,
)


__all__ = (
"ClientClassSerializerMixin",
"EvaluateClientClassSerializerMixin",
Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/api/serializers_/option.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from .mixins import ClientClassSerializerMixin


__all__ = ("OptionSerializer",)


Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/api/serializers_/option_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from netbox_dhcp.models import OptionDefinition


__all__ = ("OptionDefinitionSerializer",)


Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/choices/ddns.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from utilities.choices import ChoiceSet


__all__ = (
"DDNSReplaceClientNameChoices",
"DDNSConflictResolutionModeChoices",
Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/choices/dhcp_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from utilities.choices import ChoiceSet


__all__ = ("DHCPClusterStatusChoices",)


Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/choices/dhcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from utilities.choices import ChoiceSet


__all__ = (
"DHCPServerStatusChoices",
"DHCPServerIDTypeChoices",
Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/choices/host_reservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from utilities.choices import ChoiceSet


__all__ = ("HostReservationIdentifierChoices",)


Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/choices/netbox_dhcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from utilities.choices import ChoiceSet


__all__ = (
"AllocatorTypeChoices",
"PDAllocatorTypeChoices",
Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/choices/option.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from utilities.choices import ChoiceSet


__all__ = (
"OptionSendChoices",
"OptionSpaceChoices",
Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/filtersets/client_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
LifetimeFilterMixin,
)


__all__ = ("ClientClassFilterSet",)


Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/filtersets/dhcp_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from netbox_dhcp.models import DHCPCluster
from netbox_dhcp.choices import DHCPClusterStatusChoices


__all__ = ("DHCPClusterFilterSet",)


Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/filtersets/option.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from netbox_dhcp.choices import OptionSpaceChoices
from .mixins import ClientClassFilterMixin


__all__ = ("OptionFilterSet",)


Expand Down
5 changes: 4 additions & 1 deletion netbox_dhcp/forms/client_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
NetBoxDHCPFilterFormMixin,
)


__all__ = (
"ClientClassForm",
"ClientClassFilterForm",
Expand Down Expand Up @@ -103,7 +102,11 @@ class ClientClassFilterForm(
"q",
"filter_id",
"tag",
),
FieldSet(
"owner_group_id",
"owner_id",
name=_("Ownership"),
),
FieldSet(
"name",
Expand Down
5 changes: 4 additions & 1 deletion netbox_dhcp/forms/dhcp_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
NetBoxDHCPBulkEditFormMixin,
)


__all__ = (
"DHCPClusterForm",
"DHCPClusterFilterForm",
Expand Down Expand Up @@ -61,7 +60,11 @@ class DHCPClusterFilterForm(NetBoxDHCPFilterFormMixin, PrimaryModelFilterSetForm
"q",
"filter_id",
"tag",
),
FieldSet(
"owner_group_id",
"owner_id",
name=_("Ownership"),
),
FieldSet(
"name",
Expand Down
5 changes: 4 additions & 1 deletion netbox_dhcp/forms/dhcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
DDNSUpdateBulkEditFormMixin,
)


__all__ = (
"DHCPServerForm",
"DHCPServerFilterForm",
Expand Down Expand Up @@ -227,7 +226,11 @@ class DHCPServerFilterForm(
"q",
"filter_id",
"tag",
),
FieldSet(
"owner_group_id",
"owner_id",
name=_("Ownership"),
),
FieldSet(
"name",
Expand Down
5 changes: 4 additions & 1 deletion netbox_dhcp/forms/host_reservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
NetBoxDHCPFilterFormMixin,
)


__all__ = (
"HostReservationForm",
"HostReservationFilterForm",
Expand Down Expand Up @@ -232,7 +231,11 @@ class HostReservationFilterForm(
"q",
"filter_id",
"tag",
),
FieldSet(
"owner_group_id",
"owner_id",
name=_("Ownership"),
),
FieldSet(
"name",
Expand Down
4 changes: 4 additions & 0 deletions netbox_dhcp/forms/option.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ class OptionFilterForm(
"q",
"filter_id",
"tag",
),
FieldSet(
"owner_group_id",
"owner_id",
name=_("Ownership"),
),
FieldSet(
"name",
Expand Down
5 changes: 4 additions & 1 deletion netbox_dhcp/forms/option_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
NetBoxDHCPBulkEditFormMixin,
)


__all__ = (
"OptionDefinitionForm",
"OptionDefinitionFilterForm",
Expand Down Expand Up @@ -134,7 +133,11 @@ class OptionDefinitionFilterForm(
"q",
"filter_id",
"tag",
),
FieldSet(
"owner_group_id",
"owner_id",
name=_("Ownership"),
),
FieldSet(
"family",
Expand Down
5 changes: 4 additions & 1 deletion netbox_dhcp/forms/pd_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

from .mixins.model import DYNAMIC_ATTRIBUTES


__all__ = (
"PDPoolForm",
"PDPoolFilterForm",
Expand Down Expand Up @@ -164,7 +163,11 @@ class PDPoolFilterForm(
"q",
"filter_id",
"tag",
),
FieldSet(
"owner_group_id",
"owner_id",
name=_("Ownership"),
),
FieldSet(
"name",
Expand Down
5 changes: 4 additions & 1 deletion netbox_dhcp/forms/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@

from .mixins.model import DYNAMIC_ATTRIBUTES


__all__ = (
"PoolForm",
"PoolFilterForm",
Expand Down Expand Up @@ -134,7 +133,11 @@ class PoolFilterForm(
"q",
"filter_id",
"tag",
),
FieldSet(
"owner_group_id",
"owner_id",
name=_("Ownership"),
),
FieldSet(
"name",
Expand Down
5 changes: 4 additions & 1 deletion netbox_dhcp/forms/shared_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

from .mixins.model import DYNAMIC_ATTRIBUTES


__all__ = (
"SharedNetworkForm",
"SharedNetworkFilterForm",
Expand Down Expand Up @@ -171,7 +170,11 @@ class SharedNetworkFilterForm(
"q",
"filter_id",
"tag",
),
FieldSet(
"owner_group_id",
"owner_id",
name=_("Ownership"),
),
FieldSet(
"name",
Expand Down
5 changes: 4 additions & 1 deletion netbox_dhcp/forms/subnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@

from .mixins.model import DYNAMIC_ATTRIBUTES


__all__ = (
"SubnetForm",
"SubnetFilterForm",
Expand Down Expand Up @@ -195,7 +194,11 @@ class SubnetFilterForm(
"q",
"filter_id",
"tag",
),
FieldSet(
"owner_group_id",
"owner_id",
name=_("Ownership"),
),
FieldSet(
"name",
Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/graphql/filters/dhcp_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from netbox_dhcp.models import DHCPCluster


__all__ = ("NetBoxDHCPClusterFilter",)


Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/graphql/filters/host_reservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from netbox.graphql.filters import PrimaryModelFilter


if TYPE_CHECKING:
from ipam.graphql.filters import IPAddressFilter, PrefixFilter
from dcim.graphql.filters import MACAddressFilter
Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/tests/custom/netbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from utilities.testing.views import ModelViewTestCase as NetBoxModelViewTestCase
from netbox.api.exceptions import GraphQLTypeNotFound


__all__ = (
"NetBoxDHCPGraphQLMixin",
"ModelViewTestCase",
Expand Down
5 changes: 2 additions & 3 deletions netbox_dhcp/validators/option.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from netbox_dhcp.choices import OptionTypeChoices


__all__ = ("validate_data",)


Expand Down Expand Up @@ -58,7 +57,7 @@ def validate_ipv6_prefix(data):
if not (split_data := re.match(r"(.*)/(.*)", data)):
raise ValidationError(_("{data} is not a valid IPv6 prefix").format(data=data))

(address, prefixlen) = split_data.groups()
address, prefixlen = split_data.groups()
if (
not netaddr.valid_ipv6(address)
or not prefixlen.isnumeric()
Expand All @@ -71,7 +70,7 @@ def validate_psid(data):
if not (split_data := re.match(r"(.*)/(.*)", data)):
raise ValidationError(_("{data} is not a valid PSID").format(data=data))

(psid, psid_len) = split_data.groups()
psid, psid_len = split_data.groups()
if (
not psid.isnumeric()
or int(psid) not in range(0, 17)
Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/views/client_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
ParentOptionTable,
)


__all__ = ()


Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/views/dhcp_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
)
from netbox_dhcp.tables import DHCPClusterTable


__all__ = (
"DHCPClusterView",
"DHCPClusterListView",
Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/views/dhcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
OptionDefinitionTable,
)


__all__ = (
"DHCPServerView",
"DHCPServerListView",
Expand Down
1 change: 0 additions & 1 deletion netbox_dhcp/views/host_reservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
)
from netbox_dhcp.tables import HostReservationTable, ChildOptionTable


__all__ = (
"HostReservationView",
"HostReservationListView",
Expand Down
Loading