Skip to content

Commit

Permalink
Add a few missing type annotations (Chia-Network#17043)
Browse files Browse the repository at this point in the history
* Add a few missing type annotations

* Update chia/util/struct_stream.py

Co-authored-by: Kyle Altendorf <[email protected]>

* Update chia/util/keyring_wrapper.py

Co-authored-by: Kyle Altendorf <[email protected]>

* add `ClassVar` import

---------

Co-authored-by: Kyle Altendorf <[email protected]>
  • Loading branch information
2 people authored and mikehw committed Jan 11, 2024
1 parent 244ccd9 commit b510998
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chia/cmds/check_wallet_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def print_min_max_derivation_for_wallets(derivation_paths: List[DerivationPath])
class WalletDBReader:
db_wrapper: DBWrapper2 # TODO: Remove db_wrapper member
config = {"db_readers": 1}
sql_log_path = None
sql_log_path: Optional[Path] = None
verbose = False

async def get_all_wallets(self) -> List[Wallet]:
Expand Down
6 changes: 3 additions & 3 deletions chia/util/keyring_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from pathlib import Path
from sys import platform
from typing import Optional, Tuple, Union, overload
from typing import ClassVar, Optional, Tuple, Union, overload

from keyring.backends.macOS import Keyring as MacKeyring
from keyring.backends.Windows import WinVaultKeyring as WinKeyring
Expand Down Expand Up @@ -63,8 +63,8 @@ class KeyringWrapper:
"""

# Static members
__shared_instance = None
__keys_root_path: Path = DEFAULT_KEYS_ROOT_PATH
__shared_instance: ClassVar[Optional[KeyringWrapper]] = None
__keys_root_path: ClassVar[Path] = DEFAULT_KEYS_ROOT_PATH

# Instance members
keys_root_path: Path
Expand Down

0 comments on commit b510998

Please sign in to comment.