diff options
| author | Bob Halley <halley@dnspython.org> | 2022-10-02 10:04:05 -0700 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2022-10-02 10:04:05 -0700 |
| commit | bfa397c9b97487e4f9d54f3d41323ccda1fc4b1d (patch) | |
| tree | 39a55f7c953ead04f591dd42bd89ad6a80c86733 /dns | |
| parent | bc4c1901384f725a7e4deb30cbef930449e872c7 (diff) | |
| download | dnspython-bfa397c9b97487e4f9d54f3d41323ccda1fc4b1d.tar.gz | |
more lint
Diffstat (limited to 'dns')
| -rw-r--r-- | dns/asyncquery.py | 2 | ||||
| -rw-r--r-- | dns/enum.py | 4 | ||||
| -rw-r--r-- | dns/message.py | 2 | ||||
| -rw-r--r-- | dns/rdataset.py | 4 | ||||
| -rw-r--r-- | dns/win32util.py | 12 | ||||
| -rw-r--r-- | dns/zone.py | 2 | ||||
| -rw-r--r-- | dns/zonefile.py | 6 |
7 files changed, 21 insertions, 11 deletions
diff --git a/dns/asyncquery.py b/dns/asyncquery.py index dd1fba4..107f766 100644 --- a/dns/asyncquery.py +++ b/dns/asyncquery.py @@ -482,7 +482,7 @@ async def https( timeout: Optional[float] = None, port: int = 443, source: Optional[str] = None, - source_port: int = 0, + source_port: int = 0, # pylint: disable=W0613 one_rr_per_rrset: bool = False, ignore_trailing: bool = False, client: Optional["httpx.AsyncClient"] = None, diff --git a/dns/enum.py b/dns/enum.py index 0eeafd4..b5a4aed 100644 --- a/dns/enum.py +++ b/dns/enum.py @@ -94,11 +94,11 @@ class IntEnum(enum.IntEnum): return "" @classmethod - def _extra_from_text(cls, text): + def _extra_from_text(cls, text): # pylint: disable=W0613 return None @classmethod - def _extra_to_text(cls, value, current_text): + def _extra_to_text(cls, value, current_text): # pylint: disable=W0613 return current_text @classmethod diff --git a/dns/message.py b/dns/message.py index 507a5b0..8250db3 100644 --- a/dns/message.py +++ b/dns/message.py @@ -1096,8 +1096,8 @@ class _WireReader: (rdclass, rdtype, deleting, empty) = self.message._parse_rr_header( section_number, name, rdclass, rdtype ) + rdata_start = self.parser.current try: - rdata_start = self.parser.current if empty: if rdlen > 0: raise dns.exception.FormError diff --git a/dns/rdataset.py b/dns/rdataset.py index 072e7f7..c0ede42 100644 --- a/dns/rdataset.py +++ b/dns/rdataset.py @@ -98,9 +98,9 @@ class Rdataset(dns.set.Set): elif ttl < self.ttl: self.ttl = ttl - def add( + def add( # pylint: disable=arguments-differ,arguments-renamed self, rd: dns.rdata.Rdata, ttl: Optional[int] = None - ) -> None: # pylint: disable=arguments-differ + ) -> None: """Add the specified rdata to the rdataset. If the optional *ttl* parameter is supplied, then diff --git a/dns/win32util.py b/dns/win32util.py index deebc81..b9db291 100644 --- a/dns/win32util.py +++ b/dns/win32util.py @@ -8,12 +8,18 @@ if sys.platform == "win32": _prefer_wmi = True - import winreg + import winreg # pylint: disable=import-error + + # Keep pylint quiet on non-windows. + try: + WindowsError is None # pylint: disable=used-before-assignment + except KeyError: + WindowsError = Exception try: import threading - import pythoncom - import wmi + import pythoncom # pylint: disable=import-error + import wmi # pylint: disable=import-error _have_wmi = True except Exception: diff --git a/dns/zone.py b/dns/zone.py index d3bdb3b..cc8268d 100644 --- a/dns/zone.py +++ b/dns/zone.py @@ -904,8 +904,6 @@ class VersionedNode(dns.node.Node): # lgtm[py/missing-equals] @dns.immutable.immutable class ImmutableVersionedNode(VersionedNode): - __slots__ = ["id"] - def __init__(self, node): super().__init__() self.id = node.id diff --git a/dns/zonefile.py b/dns/zonefile.py index a04ccf3..1a53f5b 100644 --- a/dns/zonefile.py +++ b/dns/zonefile.py @@ -603,6 +603,9 @@ class RRsetsReaderTransaction(dns.transaction.Transaction): def _set_origin(self, origin): pass + def _iterate_rdatasets(self): + raise NotImplementedError # pragma: no cover + class RRSetsReaderManager(dns.transaction.TransactionManager): def __init__( @@ -613,6 +616,9 @@ class RRSetsReaderManager(dns.transaction.TransactionManager): self.rdclass = rdclass self.rrsets = [] + def reader(self): # pragma: no cover + raise NotImplementedError + def writer(self, replacement=False): assert replacement is True return RRsetsReaderTransaction(self, True, False) |
