Optional[int]: Use token count for token cards.
Source code in src\layouts.py
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499 | @auto_prop_cached
def card_count(self) -> Optional[int]:
"""Optional[int]: Use token count for token cards."""
# Skip if collector mode doesn't require it or if collector number is bad
if CFG.collector_mode != CollectorMode.Normal or not self.collector_number_raw:
return
# Prefer printed count, fallback to card count, skip if count isn't found
return self.set_data.get('count_tokens', None)
|