mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 10:32:21 +02:00
[typing] add type hints for dictionaries
This commit is contained in:
parent
6d43cf7952
commit
def62c3a47
4 changed files with 10 additions and 5 deletions
|
@ -4,7 +4,9 @@
|
|||
|
||||
import asyncio
|
||||
import logging
|
||||
from ssl import SSLContext
|
||||
import threading
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
from httpx_socks import AsyncProxyTransport
|
||||
|
@ -23,7 +25,7 @@ else:
|
|||
|
||||
logger = logger.getChild('searx.network.client')
|
||||
LOOP = None
|
||||
SSLCONTEXTS = {}
|
||||
SSLCONTEXTS: Dict[Any, SSLContext] = {}
|
||||
TRANSPORT_KWARGS = {
|
||||
'trust_env': False,
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import atexit
|
|||
import asyncio
|
||||
import ipaddress
|
||||
from itertools import cycle
|
||||
from typing import Dict
|
||||
|
||||
import httpx
|
||||
|
||||
|
@ -16,7 +17,7 @@ from .client import new_client, get_loop, AsyncHTTPTransportNoHttp
|
|||
|
||||
logger = logger.getChild('network')
|
||||
DEFAULT_NAME = '__DEFAULT__'
|
||||
NETWORKS = {}
|
||||
NETWORKS: Dict[str, 'Network'] = {}
|
||||
# requests compatibility when reading proxy settings from settings.yml
|
||||
PROXY_PATTERN_MAPPING = {
|
||||
'http': 'http://',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue