diff --git a/PRETTY_GOOD_PRACTICES.md b/PRETTY_GOOD_PRACTICES.md index 15ce8d5862..a5782f5bb0 100644 --- a/PRETTY_GOOD_PRACTICES.md +++ b/PRETTY_GOOD_PRACTICES.md @@ -394,7 +394,7 @@ bother_waterfowl(fowl=Goose(), aggressiveness=3) When hinting based on a Protocol there can often be unexpected complexities. Consider passing in an instance of a class with an attribute hinted `str` while the protocol hints it as `Union[str, int]`. -It is common to expect that `str` satisfies `Union[str, int]` and to be throughly confused by mypy's complaint that it does not. +It is common to expect that `str` satisfies `Union[str, int]` and to be thoroughly confused by mypy's complaint that it does not. The hazard here is that since the function receiving the object thinks the attribute can be either a `str` or an `int` it may decide to assign an `int` to it. The protocol says this is ok. A good solution for many cases is to hint that attribute as being read only on the protocol. diff --git a/chia/consensus/blockchain.py b/chia/consensus/blockchain.py index bc35faab80..db5feaad02 100644 --- a/chia/consensus/blockchain.py +++ b/chia/consensus/blockchain.py @@ -362,7 +362,7 @@ class Blockchain: fork_info.reset(block.height - 1, block.prev_header_hash) # we dont consider block_record passed in here since it might be from - # a current sync process and not yet fully validated and commited to the DB + # a current sync process and not yet fully validated and committed to the DB block_rec_from_db = await self.get_block_record_from_db(header_hash) if block_rec_from_db is not None: # We have already validated the block, but if it's not part of the diff --git a/chia/consensus/default_constants.py b/chia/consensus/default_constants.py index 7063e649ce..e0261fc286 100644 --- a/chia/consensus/default_constants.py +++ b/chia/consensus/default_constants.py @@ -38,7 +38,7 @@ DEFAULT_CONSTANTS = ConsensusConstants( # Default used for tests is std_hash(b'') GENESIS_CHALLENGE=bytes32.fromhex("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"), # Forks of chia should change the AGG_SIG_*_ADDITIONAL_DATA values to provide - # replay attack protection. This is set to mainnet genesis challange + # replay attack protection. This is set to mainnet genesis challenge AGG_SIG_ME_ADDITIONAL_DATA=AGG_SIG_DATA, AGG_SIG_PARENT_ADDITIONAL_DATA=std_hash(AGG_SIG_DATA + bytes([43])), AGG_SIG_PUZZLE_ADDITIONAL_DATA=std_hash(AGG_SIG_DATA + bytes([44])), diff --git a/chia/types/blockchain_format/program.py b/chia/types/blockchain_format/program.py index 3c6f603cdc..7aa9776b35 100644 --- a/chia/types/blockchain_format/program.py +++ b/chia/types/blockchain_format/program.py @@ -155,7 +155,7 @@ class Program(SExp): # (2 (1 . self) rest) # # Resulting in a function which places its own arguments after those - # curried in in the form of a proper list. + # curried in the form of a proper list. def curry(self, *args) -> Program: fixed_args: Any = 1 for arg in reversed(args): diff --git a/tools/chialispp.py b/tools/chialispp.py index d8398e4a0e..0127016b41 100644 --- a/tools/chialispp.py +++ b/tools/chialispp.py @@ -49,7 +49,7 @@ class Formatter: def __init__(self) -> None: self.start_paren_level: int = 0 self.paren_level: int = 0 - self.out_col: int = 0 # The colum we are at while outputting a line + self.out_col: int = 0 # The column we are at while outputting a line self.cur_line: int = 0 self.line: list[bytes] = [] self.comment: Optional[list[bytes]] = None