mirror of
https://github.com/Dinnerbone/mcstatus.git
synced 2026-04-05 11:31:23 +08:00
Use typing_extensions for SupportsIndex
Co-authored-by: ItsDrike <itsdrike@protonmail.com>
This commit is contained in:
committed by
Kevin Tindall
parent
6be73e995b
commit
2074009a8d
@@ -1,13 +1,8 @@
|
||||
from abc import abstractmethod, ABC
|
||||
from typing import SupportsBytes, Iterable, Tuple, Union
|
||||
from typing_extensions import SupportsIndex # Python 3.7 doesn't support this yet.
|
||||
|
||||
try:
|
||||
from typing import SupportsBytes, Iterable, SupportsIndex, Tuple, Union
|
||||
|
||||
BytesConvertable = Union[SupportsIndex, Iterable[SupportsIndex]]
|
||||
except ImportError:
|
||||
from typing import SupportsBytes, Iterable, Tuple, Union
|
||||
|
||||
BytesConvertable = Union[int, Iterable[int]]
|
||||
BytesConvertable = Union[SupportsIndex, Iterable[SupportsIndex]]
|
||||
import socket
|
||||
import struct
|
||||
import asyncio
|
||||
|
||||
4
poetry.lock
generated
4
poetry.lock
generated
@@ -715,7 +715,7 @@ python-versions = ">=3.6"
|
||||
name = "typing-extensions"
|
||||
version = "4.0.1"
|
||||
description = "Backported and Experimental Type Hints for Python 3.6+"
|
||||
category = "dev"
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
|
||||
@@ -786,7 +786,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes
|
||||
[metadata]
|
||||
lock-version = "1.1"
|
||||
python-versions = ">=3.7"
|
||||
content-hash = "9e819727883898bb2d4f2bd80e98f1488c66584232802e51325d534e15639edd"
|
||||
content-hash = "929f5970e749a6090ecd06bf16d1c2e52f6f5dad348d4472c1d5d92b6c9235c3"
|
||||
|
||||
[metadata.files]
|
||||
asyncio-dgram = [
|
||||
|
||||
@@ -33,6 +33,7 @@ python = ">=3.7"
|
||||
asyncio-dgram = "1.2.0"
|
||||
click = "7.1.2"
|
||||
dnspython = "2.1.0"
|
||||
typing-extensions = "^4.0.1"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
coverage = "^6.1.1"
|
||||
|
||||
Reference in New Issue
Block a user