]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Add type annotations for various BaseResolver attributes 791/head
authorwouter bolsterlee <wouter@bolsterl.ee>
Fri, 11 Mar 2022 17:23:02 +0000 (18:23 +0100)
committerwouter bolsterlee <wouter@bolsterl.ee>
Fri, 11 Mar 2022 17:23:02 +0000 (18:23 +0100)
commit6b8dabc25c63eec35f41297fddceab4302ef84c2
tree0d87cc63fb8ed2049e950c089916930505fd7628
parentd4ec134b09adcc243638af77a8bf0e6a09625b62
Add type annotations for various BaseResolver attributes

This adds class level type annotations for BaseResolver attributes.
partially based on the existing annotations from `.reset()` (which have
now moved).

Mypy does not infer BaseResolver attributes because those are not
defined `.__init__()` method, but in `.reset()`; there is already a
pylint override for this. The result is that application code that
accesses `resolver.port` and other attributes incorrectly triggers mypy
errors about the seemingly not existing attribute.

While at it, fix a few easy to address mypy/flake8 warnings that popped
up on my screen while editing this file.
dns/resolver.py