[CHIA-1731] Add comments about PLR6201 (#18963)

* Add comments about PLR6201

* Change comment

* Change comment
This commit is contained in:
Matt Hauff
2024-12-03 09:45:57 -07:00
committed by GitHub
parent 2fe179c975
commit 8dd76e5d1c
+7
View File
@@ -180,6 +180,9 @@ class TestKeychain:
# All added keys should still be valid with their label
assert all(
# This must be compared to a tuple because the `.mnemonic` property is a list which makes the
# class unhashable. We should eventually add support in streamable for varadic tuples and maybe remove
# support for the mutable `list`.
key_data in (key_data_0, key_data_1, key_data_2) # noqa: PLR6201
for key_data in keychain.get_keys(include_secrets=True)
)
@@ -428,6 +431,10 @@ async def test_set_label(get_temp_keyring: Keychain) -> None:
keychain.set_label(fingerprint=key_data_1.fingerprint, label=key_data_1.label)
assert key_data_0 == keychain.get_key(fingerprint=key_data_0.fingerprint, include_secrets=True)
# All added keys should still be valid with their label
# This must be compared to a tuple because the `.mnemonic` property is a list which makes the
# class unhashable. We should eventually add support in streamable for varadic tuples and maybe remove
# support for the mutable `list`.
assert all(key_data in (key_data_0, key_data_1) for key_data in keychain.get_keys(include_secrets=True)) # noqa: PLR6201