Skip to content

Commit

Permalink
Quickfix for py3.8 typing
Browse files Browse the repository at this point in the history
  • Loading branch information
fkantelberg committed Jun 16, 2023
1 parent 5899b85 commit 62ca8ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 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 Dict, List, Optional, Sequence, Tuple
from typing import Any, Dict, List, Optional, Sequence, Tuple

from . import base, package, tunnel, utils
from .connection import Connection
Expand Down Expand Up @@ -37,7 +37,8 @@ def __init__(
self.tunnel_host: Sequence[str] = tunnel_host.split(",") if tunnel_host else ""
self.tunnel_port: Optional[int] = None
self.ports: Optional[Tuple[int, int]] = ports
self.server: Optional[asyncio.Server] = None
# Should by type Optional[asyncio.Server] but 3.8 fails
self.server: Any = None
self.connections: Dict[base.IPvXAddress, utils.Ban] = collections.defaultdict(
utils.Ban
)
Expand Down

0 comments on commit 62ca8ba

Please sign in to comment.