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
+2
View File
@@ -652,6 +652,8 @@ class APIClient(_Session):
def get_adapter(self, url: str) -> BaseAdapter:
try:
# pylint finds our Session stub instead of requests.Session:
# pylint: disable-next=no-member
return super().get_adapter(url)
except _InvalidSchema as e:
if self._custom_adapter: