mirror of
https://github.com/nihilvux/bancho.py.git
synced 2025-09-17 02:58:39 -07:00
Add files via upload
This commit is contained in:
27
app/_typing.py
Normal file
27
app/_typing.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from ipaddress import IPv4Address
|
||||
from ipaddress import IPv6Address
|
||||
from typing import Any
|
||||
from typing import TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
IPAddress = IPv4Address | IPv6Address
|
||||
|
||||
|
||||
class _UnsetSentinel:
|
||||
def __repr__(self) -> str:
|
||||
return "Unset"
|
||||
|
||||
def __copy__(self: T) -> T:
|
||||
return self
|
||||
|
||||
def __reduce__(self) -> str:
|
||||
return "Unset"
|
||||
|
||||
def __deepcopy__(self: T, _: Any) -> T:
|
||||
return self
|
||||
|
||||
|
||||
UNSET = _UnsetSentinel()
|
Reference in New Issue
Block a user