Apply Hww's suggestions (mostly "Returns" -> "Return")

Co-authored-by: Hsiao-Wei Wang <hwwang156@gmail.com>
This commit is contained in:
Carl Beekhuizen 2020-08-24 16:29:42 +02:00 committed by GitHub
parent f247b1b613
commit 4542faca87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 7 deletions

View File

@ -76,7 +76,7 @@ class Credential:
@property @property
def deposit_datum_dict(self) -> Dict[str, bytes]: def deposit_datum_dict(self) -> Dict[str, bytes]:
""" """
Returns a single deposit datum for 1 validator including all Return a single deposit datum for 1 validator including all
the information needed to verify and process the deposit. the information needed to verify and process the deposit.
""" """
signed_deposit_datum = self.signed_deposit signed_deposit_datum = self.signed_deposit

View File

@ -39,7 +39,7 @@ def _get_word_list(language: str, path: str) -> Sequence[str]:
def _get_word(*, word_list: Sequence[str], index: int) -> str: def _get_word(*, word_list: Sequence[str], index: int) -> str:
""" """
Returns the corresponding word for the supplied index while stripping out '\\n' chars. Return the corresponding word for the supplied index while stripping out '\\n' chars.
""" """
assert index < 2048 assert index < 2048
return word_list[index][:-1] return word_list[index][:-1]

View File

@ -20,7 +20,7 @@ def path_to_nodes(path: str) -> List[int]:
def mnemonic_and_path_to_key(*, mnemonic: str, path: str, password: str) -> int: def mnemonic_and_path_to_key(*, mnemonic: str, path: str, password: str) -> int:
""" """
Returns the SK at position `path`, secured with `password` derived from `mnemonic`. Return the SK at position `path`, secured with `password` derived from `mnemonic`.
""" """
seed = get_seed(mnemonic=mnemonic, password=password) seed = get_seed(mnemonic=mnemonic, password=password)
sk = derive_master_SK(seed) sk = derive_master_SK(seed)

View File

@ -59,7 +59,7 @@ def _HKDF_mod_r(*, IKM: bytes, key_info: bytes=b'') -> int:
def derive_child_SK(*, parent_SK: int, index: int) -> int: def derive_child_SK(*, parent_SK: int, index: int) -> int:
""" """
Given a SK, `derive_child_SK` returns the child SK at the supplied `index` Given a parent SK `parent_SK`, return the child SK at the supplied `index`.
Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2333.md#derive_child_sk Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2333.md#derive_child_sk
""" """

View File

@ -75,7 +75,7 @@ class KeystoreCrypto(BytesDataclass):
@dataclass @dataclass
class Keystore(BytesDataclass): class Keystore(BytesDataclass):
""" """
Implements an EIP 2335-compliant keystore. A keystore is a JSON file that Implement an EIP 2335-compliant keystore. A keystore is a JSON file that
stores an encrypted version of a private key under a user-supplied password. stores an encrypted version of a private key under a user-supplied password.
Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2335.md Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2335.md

View File

@ -43,7 +43,7 @@ def compute_deposit_domain(fork_version: bytes) -> bytes:
def compute_deposit_fork_data_root(current_version: bytes) -> bytes: def compute_deposit_fork_data_root(current_version: bytes) -> bytes:
""" """
Returns the appropriate ForkData root for a given deposit version. Return the appropriate ForkData root for a given deposit version.
""" """
genesis_validators_root = ZERO_BYTES32 # For deposit, it's fixed value genesis_validators_root = ZERO_BYTES32 # For deposit, it's fixed value
assert len(current_version) == 4 assert len(current_version) == 4

View File

@ -21,7 +21,7 @@ from eth2deposit.utils.constants import (
def verify_deposit_data_json(filefolder: str) -> bool: def verify_deposit_data_json(filefolder: str) -> bool:
""" """
Validates every deposit found in the deposit-data json file. Validate every deposit found in the deposit-data JSON file folder.
""" """
with open(filefolder, 'r') as f: with open(filefolder, 'r') as f:
deposit_json = json.load(f) deposit_json = json.load(f)