diff --git a/justfile b/justfile index 6057424..c34fc9a 100644 --- a/justfile +++ b/justfile @@ -43,12 +43,9 @@ create_reqs: lint: just show_system_info - just test_shfmt - just test_shfmt @hatch run lint:style @hatch run lint:typing format: just show_system_info - just format_shfmt @hatch run lint:fmt diff --git a/src/octodns_netbox_dns/__init__.py b/src/octodns_netbox_dns/__init__.py index d7891fe..1cc7af5 100644 --- a/src/octodns_netbox_dns/__init__.py +++ b/src/octodns_netbox_dns/__init__.py @@ -16,7 +16,7 @@ class NetBoxDNSSource(octodns.source.base.BaseSource): SUPPORTS_GEO = False SUPPORTS_DYNAMIC = False - SUPPORTS: frozenset = { + SUPPORTS: set[str] = { "A", "AAAA", "AFSDB", @@ -64,7 +64,7 @@ class NetBoxDNSSource(octodns.source.base.BaseSource): self.log.debug(f"__init__: {id=}, {url=}, {view=}, {replace_duplicates=}, {make_absolute=}") super().__init__(id) self._api = pynetbox.core.api.Api(url, token) - self._nb_view = {} if view is False else self._get_view(view) + self._nb_view = self._get_view(view) self._ttl = ttl self.replace_duplicates = replace_duplicates self.make_absolute = make_absolute @@ -74,7 +74,9 @@ class NetBoxDNSSource(octodns.source.base.BaseSource): return value return value + "." - def _get_view(self, view: str | Literal[False]) -> dict[str, int | str]: + def _get_view(self, view: str | None | Literal[False]) -> dict[str, int | str]: + if view is False: + return {} if view is None: return {"view": "null"}