aqt.schema_change_tracker
=========================

.. py:module:: aqt.schema_change_tracker


Classes
-------

.. autoapisummary::

   aqt.schema_change_tracker.Change
   aqt.schema_change_tracker.ChangeTracker


Module Contents
---------------

.. py:class:: Change(*args, **kwds)

   Bases: :py:obj:`enum.Enum`


   Create a collection of name/value pairs.

   Example enumeration:

   >>> class Color(Enum):
   ...     RED = 1
   ...     BLUE = 2
   ...     GREEN = 3

   Access them by:

   - attribute access:

     >>> Color.RED
     <Color.RED: 1>

   - value lookup:

     >>> Color(1)
     <Color.RED: 1>

   - name lookup:

     >>> Color['RED']
     <Color.RED: 1>

   Enumerations can be iterated over, and know how many members they have:

   >>> len(Color)
   3

   >>> list(Color)
   [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

   Methods can be added to enumerations, and members can have their own
   attributes -- see the documentation for details.


   .. py:attribute:: NO_CHANGE
      :value: 0



   .. py:attribute:: BASIC_CHANGE
      :value: 1



   .. py:attribute:: SCHEMA_CHANGE
      :value: 2



.. py:class:: ChangeTracker(mw: aqt.AnkiQt)

   .. py:attribute:: mw


   .. py:method:: mark_basic() -> None


   .. py:method:: mark_schema() -> bool

      If false, processing should be aborted.



   .. py:method:: changed() -> bool


   .. py:method:: set_unchanged() -> None


