genanki icon indicating copy to clipboard operation
genanki copied to clipboard

Fix comparison between set and dictionary

Open ernieIzde8ski opened this issue 4 months ago • 0 comments

The check card_ords == {} will always evaluate to False, even when it is empty. This is because card_ords is a set, and {} is a dictionary.

>>> set() == {}
False

The intended check was probably something like "card ords is empty", which can be expressed as if not card_ords.

ernieIzde8ski avatar Oct 06 '24 23:10 ernieIzde8ski