Recently Anki is filled with deprecation warnings as:
1788670778\representation\deck.py:97:'joinedFields' is deprecated: please use 'joined_fields'
1788670778\representation\deck_initializer.py:10:'byName' is deprecated: please use 'by_name'
1788670778\representation\deck_config.py:12:'getConf' is deprecated: please use 'get_config'
One way I have been fixing with was with:
join_fields = anki_object.joined_fields if hasattr(anki_object, 'joined_fields') else anki_object.joinedFields
However, I cannot use this for this other warning because there is nothing to check with hasattr
:
CrowdAnki\representation\note_model.py:51:flush() is deprecated: no longer required
Is there an Anki version I can check as in this example:
if anki_major > 3 and anki_minor < 40:
collection.models.flush()