Skip to content

Commit

Permalink
Fix pylint 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
fkantelberg committed Jun 16, 2023
1 parent cbfa319 commit 9a7b771
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/socket_proxy/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from asyncio import StreamReader, StreamWriter
from collections import defaultdict
from datetime import datetime, timedelta
from typing import Any, List, Optional, Sequence, Union
from typing import Any, Dict, List, Optional, Sequence, Union

from . import api, base, event, package, utils
from .tunnel_server import TunnelServer
Expand Down Expand Up @@ -38,7 +38,7 @@ def __init__(
self.host, self.port = host, port
self.max_tunnels = base.config.max_tunnels
self.http_ssl = base.config.http_ssl
self.tunnels: dict[str, TunnelServer] = {}
self.tunnels: Dict[str, TunnelServer] = {}
self.sc = utils.generate_ssl_context(
cert=cert,
key=key,
Expand All @@ -49,7 +49,7 @@ def __init__(

# Authentication
self.authentication = authentication
self.tokens: defaultdict[base.AuthType, dict] = defaultdict(dict)
self.tokens: Dict[base.AuthType, dict] = defaultdict(dict)
self.auth_timeout = auth_timeout

self.event = event.EventSystem(
Expand All @@ -60,7 +60,7 @@ def __init__(

self.http_host: Optional[str] = None
self.http_port: Optional[str] = None
self.http_domain_regex: Optional[re.Pattern[bytes]] = None
self.http_domain_regex: Optional[re.Pattern] = None
if isinstance(base.config.http_domain, str) and base.config.http_listen:
self.http_host, self.http_port = base.config.http_listen
self.http_domain = base.config.http_domain
Expand Down
4 changes: 2 additions & 2 deletions src/socket_proxy/tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import time
from datetime import datetime
from ipaddress import ip_network
from typing import Any, Optional
from typing import Any, Dict, Optional

from . import base, package, utils
from .connection import Connection
Expand All @@ -30,7 +30,7 @@ def __init__(
self.protocol: base.ProtocolType = protocol
self.domain: str = domain or ""

self.clients: dict[bytes, Connection] = {}
self.clients: Dict[bytes, Connection] = {}

self.chunk_size: int = chunk_size
self.bantime: int = base.config.ban_time
Expand Down
4 changes: 2 additions & 2 deletions src/socket_proxy/tunnel_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from asyncio import StreamReader, StreamWriter
from datetime import datetime, timedelta
from ipaddress import ip_address
from typing import List, Optional, Sequence, Tuple
from typing import Dict, List, Optional, Sequence, Tuple

from . import base, package, tunnel, utils
from .connection import Connection
Expand Down Expand Up @@ -38,7 +38,7 @@ def __init__(
self.tunnel_port: Optional[int] = None
self.ports: Optional[Tuple[int, int]] = ports
self.server: Optional[asyncio.Server] = None
self.connections: dict[base.IPvXAddress, utils.Ban] = collections.defaultdict(
self.connections: Dict[base.IPvXAddress, utils.Ban] = collections.defaultdict(
utils.Ban
)
self.protocols = protocols or utils.protocols()
Expand Down

0 comments on commit 9a7b771

Please sign in to comment.