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

@@ -15,8 +15,10 @@
import copy
import logging
from logging import FileHandler
import multiprocessing
import sys
from typing import Optional
import urllib3
import http.client as httplib
@@ -133,7 +135,7 @@ conf = openapi_client.Configuration(
self.logger_stream_handler = None
"""Log stream handler
"""
self.logger_file_handler = None
self.logger_file_handler: Optional[FileHandler] = None
"""Log file handler
"""
self.logger_file = None
@@ -173,7 +175,7 @@ conf = openapi_client.Configuration(
cpu_count * 5 is used as default value to increase performance.
"""
self.proxy = None
self.proxy: Optional[str] = None
"""Proxy URL
"""
self.proxy_headers = None