Anki/anki/types.py
2019-12-21 12:02:16 +01:00

12 lines
417 B
Python

from typing import Any, Dict, Union
# Model attributes are stored in a dict keyed by strings. This type alias
# provides more descriptive function signatures than just 'Dict[str, Any]'
# for methods that operate on models.
# TODO: Use https://www.python.org/dev/peps/pep-0589/ when available in
# supported Python versions.
Model = Dict[str, Any]
Field = Dict[str, Any]
Template = Dict[str, Union[str, int, None]]