mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-11-10 12:29:49 +03:00
Merge branch 'atari' into atari-merge_main_89f15f591cc3cc3e8ae40e95ffc802f7f2561ece
This commit is contained in:
commit
7cc1728503
@ -1,14 +1,17 @@
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, Coroutine, Dict, Optional, TYPE_CHECKING
|
from typing import Any, Coroutine, Dict, Optional, TypeVar
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
from typing_extensions import Protocol
|
||||||
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
_T = TypeVar("_T")
|
||||||
# Will be located here in the next mypy release
|
|
||||||
# from _typeshed import IdentityFunction
|
|
||||||
from click.decorators import _IdentityFunction as IdentityFunction
|
class IdentityFunction(Protocol):
|
||||||
|
def __call__(self, __x: _T) -> _T:
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -36,7 +39,7 @@ def data_cmd() -> None:
|
|||||||
# malformed inputs.
|
# malformed inputs.
|
||||||
|
|
||||||
|
|
||||||
def create_changelist_option() -> "IdentityFunction":
|
def create_changelist_option() -> IdentityFunction:
|
||||||
return click.option(
|
return click.option(
|
||||||
"-d",
|
"-d",
|
||||||
"--changelist",
|
"--changelist",
|
||||||
@ -47,7 +50,7 @@ def create_changelist_option() -> "IdentityFunction":
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def create_key_option() -> "IdentityFunction":
|
def create_key_option() -> IdentityFunction:
|
||||||
return click.option(
|
return click.option(
|
||||||
"-h",
|
"-h",
|
||||||
"--key",
|
"--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(
|
return click.option(
|
||||||
"-store",
|
"-store",
|
||||||
"-id",
|
"-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(
|
return click.option(
|
||||||
"-n",
|
"-n",
|
||||||
"--table_name",
|
"--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(
|
return click.option(
|
||||||
"-dp",
|
"-dp",
|
||||||
"--data-rpc-port",
|
"--data-rpc-port",
|
||||||
|
8
setup.py
8
setup.py
@ -39,10 +39,6 @@ upnp_dependencies = [
|
|||||||
"miniupnpc==2.2.2", # Allows users to open ports on their router
|
"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 = [
|
dev_dependencies = [
|
||||||
"pre-commit",
|
"pre-commit",
|
||||||
"pytest",
|
"pytest",
|
||||||
@ -50,12 +46,12 @@ dev_dependencies = [
|
|||||||
"pytest-monitor; sys_platform == 'linux'",
|
"pytest-monitor; sys_platform == 'linux'",
|
||||||
"pytest-xdist",
|
"pytest-xdist",
|
||||||
"flake8",
|
"flake8",
|
||||||
"mypy==0.910",
|
"mypy",
|
||||||
"black",
|
"black",
|
||||||
"aiohttp_cors", # For blackd
|
"aiohttp_cors", # For blackd
|
||||||
"ipython", # For asyncio debugging
|
"ipython", # For asyncio debugging
|
||||||
"types-aiofiles",
|
"types-aiofiles",
|
||||||
"types-click==0.1.12",
|
"types-click~=7.1",
|
||||||
"types-cryptography",
|
"types-cryptography",
|
||||||
"types-pkg_resources",
|
"types-pkg_resources",
|
||||||
"types-pyyaml",
|
"types-pyyaml",
|
||||||
|
Loading…
Reference in New Issue
Block a user