Merge branch 'atari' into atari-merge_main_89f15f591cc3cc3e8ae40e95ffc802f7f2561ece

This commit is contained in:
Kyle Altendorf 2022-01-15 12:26:37 -05:00
commit 7cc1728503
No known key found for this signature in database
GPG Key ID: 5715D880FF005192
2 changed files with 15 additions and 16 deletions

View File

@ -1,14 +1,17 @@
import json
import logging
from typing import Any, Coroutine, Dict, Optional, TYPE_CHECKING
from typing import Any, Coroutine, Dict, Optional, TypeVar
import click
from typing_extensions import Protocol
if TYPE_CHECKING:
# Will be located here in the next mypy release
# from _typeshed import IdentityFunction
from click.decorators import _IdentityFunction as IdentityFunction
_T = TypeVar("_T")
class IdentityFunction(Protocol):
def __call__(self, __x: _T) -> _T:
...
logger = logging.getLogger(__name__)
@ -36,7 +39,7 @@ def data_cmd() -> None:
# malformed inputs.
def create_changelist_option() -> "IdentityFunction":
def create_changelist_option() -> IdentityFunction:
return click.option(
"-d",
"--changelist",
@ -47,7 +50,7 @@ def create_changelist_option() -> "IdentityFunction":
)
def create_key_option() -> "IdentityFunction":
def create_key_option() -> IdentityFunction:
return click.option(
"-h",
"--key",
@ -58,7 +61,7 @@ def create_key_option() -> "IdentityFunction":
)
def create_kv_store_id_option() -> "IdentityFunction":
def create_kv_store_id_option() -> IdentityFunction:
return click.option(
"-store",
"-id",
@ -68,7 +71,7 @@ def create_kv_store_id_option() -> "IdentityFunction":
)
def create_kv_store_name_option() -> "IdentityFunction":
def create_kv_store_name_option() -> IdentityFunction:
return click.option(
"-n",
"--table_name",
@ -79,7 +82,7 @@ def create_kv_store_name_option() -> "IdentityFunction":
)
def create_rpc_port_option() -> "IdentityFunction":
def create_rpc_port_option() -> IdentityFunction:
return click.option(
"-dp",
"--data-rpc-port",

View File

@ -39,10 +39,6 @@ upnp_dependencies = [
"miniupnpc==2.2.2", # Allows users to open ports on their router
]
# TODO: unpin mypy and types-click after mypy's next release. types-click >=0.1.13
# depends on changes made to typeshed after the version used in the most recent
# release of mypy, 0.910.
# https://github.com/python/typeshed/commit/7a9a107a63c5f4b938563ed6f8d934dc4b1de2c3
dev_dependencies = [
"pre-commit",
"pytest",
@ -50,12 +46,12 @@ dev_dependencies = [
"pytest-monitor; sys_platform == 'linux'",
"pytest-xdist",
"flake8",
"mypy==0.910",
"mypy",
"black",
"aiohttp_cors", # For blackd
"ipython", # For asyncio debugging
"types-aiofiles",
"types-click==0.1.12",
"types-click~=7.1",
"types-cryptography",
"types-pkg_resources",
"types-pyyaml",