python: enable more mypy checks 1/n (#17556)

* python: more mypy checks

* mypy: check_untyped_defs

* mypy: disallow_subclassing_any

* mypy: disallow_untyped_decorators

* mypy: disallow_any_generics
This commit is contained in:
Jonathan Ballet
2024-01-09 09:45:05 +01:00
committed by GitHub
parent c041d7e12f
commit df7976c1a3
234 changed files with 992 additions and 628 deletions

View File

@@ -213,14 +213,13 @@ class RESTClientObject:
preload_content=False
)
# Pass a `string` parameter directly in the body to support
# other content types than Json when `body` argument is
# provided in serialized form
# other content types than JSON when `body` argument is
# provided in serialized form.
elif isinstance(body, str) or isinstance(body, bytes):
request_body = body
r = self.pool_manager.request(
method,
url,
body=request_body,
body=body,
timeout=timeout,
headers=headers,
preload_content=False