diff --git a/dns/_compat.py b/dns/_compat.py index e56d5a1ca..a94b8422d 100644 --- a/dns/_compat.py +++ b/dns/_compat.py @@ -19,10 +19,10 @@ def maybe_decode(x): def maybe_encode(x): return x.encode() else: - text_type = unicode # pylint: disable=unicode-builtin + text_type = unicode # pylint: disable=unicode-builtin, undefined-variable binary_type = str string_types = ( - basestring, # pylint: disable=basestring-builtin + basestring, # pylint: disable=basestring-builtin, undefined-variable ) unichr = unichr # pylint: disable=unichr-builtin def maybe_decode(x): diff --git a/dns/resolver.py b/dns/resolver.py index 400ed74f5..62ebb2e52 100644 --- a/dns/resolver.py +++ b/dns/resolver.py @@ -699,7 +699,7 @@ def _config_win32_fromkey(self, key): """Extract DNS info from a registry key.""" try: servers, rtype = _winreg.QueryValueEx(key, 'NameServer') - except WindowsError: + except WindowsError: # pylint: disable=undefined-variable servers = None if servers: self._config_win32_nameservers(servers) @@ -707,12 +707,12 @@ def _config_win32_fromkey(self, key): dom, rtype = _winreg.QueryValueEx(key, 'Domain') if dom: self._config_win32_domain(dom) - except WindowsError: + except WindowsError: # pylint: disable=undefined-variable pass else: try: servers, rtype = _winreg.QueryValueEx(key, 'DhcpNameServer') - except WindowsError: + except WindowsError: # pylint: disable=undefined-variable servers = None if servers: self._config_win32_nameservers(servers) @@ -720,11 +720,11 @@ def _config_win32_fromkey(self, key): dom, rtype = _winreg.QueryValueEx(key, 'DhcpDomain') if dom: self._config_win32_domain(dom) - except WindowsError: + except WindowsError: # pylint: disable=undefined-variable pass try: search, rtype = _winreg.QueryValueEx(key, 'SearchList') - except WindowsError: + except WindowsError: # pylint: disable=undefined-variable search = None if search: self._config_win32_search(search) @@ -826,7 +826,7 @@ def _win32_is_nic_enabled(self, lm, guid, interface_key): (nte, ttype) = _winreg.QueryValueEx(interface_key, 'NTEContextList') return nte is not None - except WindowsError: + except WindowsError: # pylint: disable=undefined-variable return False def _compute_timeout(self, start): diff --git a/pylintrc b/pylintrc index cf1db3983..578b3fdd6 100644 --- a/pylintrc +++ b/pylintrc @@ -40,7 +40,6 @@ disable= round-builtin, superfluous-parens, too-many-lines, - undefined-variable, unused-argument, unused-variable, wrong-import-order,