diff options
| author | Bob Halley <halley@dnspython.org> | 2020-05-15 14:35:22 -0700 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2020-05-15 14:35:22 -0700 |
| commit | 7142bffa710d5f3d1818fd51a52eb165da695095 (patch) | |
| tree | 70d713b1add9b8b4ba42b4b34aff569240bf9380 /dns/ipv6.py | |
| parent | 6e0857eb518ba6ceb71856e6a58f6dcb936e9535 (diff) | |
| download | dnspython-7142bffa710d5f3d1818fd51a52eb165da695095.tar.gz | |
flake8 linting
Diffstat (limited to 'dns/ipv6.py')
| -rw-r--r-- | dns/ipv6.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dns/ipv6.py b/dns/ipv6.py index fca7791..5424fce 100644 --- a/dns/ipv6.py +++ b/dns/ipv6.py @@ -41,12 +41,12 @@ def inet_ntoa(address): i = 0 l = len(hex) while i < l: - chunk = hex[i : i + 4].decode() + chunk = hex[i:i + 4].decode() # strip leading zeros. we do this with an re instead of # with lstrip() because lstrip() didn't support chars until # python 2.2.2 m = _leading_zero.match(chunk) - if not m is None: + if m is not None: chunk = m.group(1) chunks.append(chunk) i += 4 @@ -127,7 +127,7 @@ def inet_aton(text, ignore_scope=False): # Get rid of the icky dot-quad syntax if we have it. # m = _v4_ending.match(text) - if not m is None: + if m is not None: b = dns.ipv4.inet_aton(m.group(2)) text = (u"{}:{:02x}{:02x}:{:02x}{:02x}".format(m.group(1).decode(), b[0], b[1], b[2], @@ -137,11 +137,11 @@ def inet_aton(text, ignore_scope=False): # turn '<whatever>::' into '<whatever>:' # m = _colon_colon_start.match(text) - if not m is None: + if m is not None: text = text[1:] else: m = _colon_colon_end.match(text) - if not m is None: + if m is not None: text = text[:-1] # # Now canonicalize into 8 chunks of 4 hex digits each |
