Python code modernization, 8/n (#1179)

* Use to_text instead of to_native.

* Remove no longer needed pylint ignores.

* Remove another pylint ignore.

* Remove no longer needed ignore.

* Address redefined-outer-name.

* Address consider-using-with.
This commit is contained in:
Felix Fontein
2025-10-25 02:36:04 +02:00
committed by GitHub
parent 6ad4bfcd40
commit be000755fc
30 changed files with 156 additions and 150 deletions
@@ -16,6 +16,8 @@ from .._import_helper import HTTPAdapter as _HTTPAdapter
class BaseHTTPAdapter(_HTTPAdapter):
def close(self) -> None:
# pylint finds our HTTPAdapter stub instead of requests.adapters.HTTPAdapter:
# pylint: disable-next=no-member
super().close()
if hasattr(self, "pools"):
self.pools.clear()