fix type errors
check code / check-code (push) Successful in 17s
Details
check code / check-code (push) Successful in 17s
Details
This commit is contained in:
parent
c692ff18d3
commit
f20e190ef6
|
@ -127,7 +127,7 @@ class NetBoxDNSSource(octodns.source.base.BaseSource):
|
||||||
|
|
||||||
return nb_zone
|
return nb_zone
|
||||||
|
|
||||||
def _format_rdata(self, rdata: dns.Rdata, raw_value: str) -> dict[str, Any]:
|
def _format_rdata(self, rdata: dns.Rdata, raw_value: str) -> str | dict[str, Any]:
|
||||||
"""
|
"""
|
||||||
Format netbox record values to correct octodns record values
|
Format netbox record values to correct octodns record values
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ class NetBoxDNSSource(octodns.source.base.BaseSource):
|
||||||
|
|
||||||
self.log.debug(f"formatted record value={value}")
|
self.log.debug(f"formatted record value={value}")
|
||||||
|
|
||||||
return value
|
return value # type:ignore
|
||||||
|
|
||||||
def _format_nb_records(self, zone: octodns.zone.Zone) -> list[dict[str, Any]]:
|
def _format_nb_records(self, zone: octodns.zone.Zone) -> list[dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
|
@ -234,8 +234,6 @@ class NetBoxDNSSource(octodns.source.base.BaseSource):
|
||||||
zone_id=nb_zone.id
|
zone_id=nb_zone.id
|
||||||
)
|
)
|
||||||
for nb_record in nb_records:
|
for nb_record in nb_records:
|
||||||
nb_record: pynetbox.core.response.Record
|
|
||||||
|
|
||||||
rcd_name: str = nb_record.name if nb_record.name != "@" else ""
|
rcd_name: str = nb_record.name if nb_record.name != "@" else ""
|
||||||
raw_value: str = nb_record.value if nb_record.value != "@" else nb_record.zone.name
|
raw_value: str = nb_record.value if nb_record.value != "@" else nb_record.zone.name
|
||||||
rcd_type: str = nb_record.type
|
rcd_type: str = nb_record.type
|
||||||
|
|
Loading…
Reference in New Issue