diff options
| author | Max Nanis | 2026-08-26 16:46:45 -0700 |
|---|---|---|
| committer | Max Nanis | 2026-08-26 16:46:45 -0700 |
| commit | cf239865ce440e1a71ee2360514eaeb018620ac9 (patch) | |
| tree | 1fefff4a0bbf10df6431e541aa5a3ff5e76f0663 /tests/models/thl/test_product_userwalletconfig.py | |
| parent | 47ea200eac0eaa7bef02f6ebb05de9afad5ee0d7 (diff) | |
| download | generalresearch-cf239865ce440e1a71ee2360514eaeb018620ac9.tar.gz generalresearch-cf239865ce440e1a71ee2360514eaeb018620ac9.zip | |
Ruff afternoon!
Diffstat (limited to 'tests/models/thl/test_product_userwalletconfig.py')
| -rw-r--r-- | tests/models/thl/test_product_userwalletconfig.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/models/thl/test_product_userwalletconfig.py b/tests/models/thl/test_product_userwalletconfig.py index 4f6a6cc..b348981 100644 --- a/tests/models/thl/test_product_userwalletconfig.py +++ b/tests/models/thl/test_product_userwalletconfig.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from itertools import groupby from random import shuffle as rshuffle @@ -7,7 +9,7 @@ from generalresearch.models.thl.product import ( from generalresearch.models.thl.wallet import PayoutType -def all_equal(iterable): +def all_equal(iterable: list[str]) -> bool: g = groupby(iterable) return next(g, True) and not next(g, False) @@ -35,13 +37,13 @@ class TestProductUserWalletConfig: # in the same order because they're the same assert isinstance(instance.model_dump_json(), str) res = [] - for idx in range(100): + for _ in range(100): res.append(instance.model_dump_json()) assert all_equal(res) def test_model_dump_payout_types(self): res = [] - for idx in range(100): + for _ in range(100): # Generate a random order of PayoutTypes each time payout_types = [e for e in PayoutType] |
