I've corrected some obvious issues, and we can fix others over time.
Mypy tests are currently broken, as adding the type hints has increased
mypy's testing surface.
Here is a bug, how to reproduce it, and why this is a fix.
This is a way to create a new note with a due card extremly high
without any add-on, just with basic anki.
Bug
===
Create a note type with three fields One, Two, and Three and three card
type One, Two and Three such that each card is generated when the
field of the same name is filled.
Create a note with fields One and Two filled only. Review card One and
click on good. Card one should goes in learning mode. Fill the field
Three. In the browser, you'll see that card Two and Three are new, but
card Two and Three's due value are distinct. More precisely, the due
value of card Three is equal to the due value of card One; except that
in card One it's interpreted as a timestamp, while in card Three it's
interpreted as a position in the list of new card.
You'll remark by the way that the due of card Three is extremly high,
potentially more than 1000000; which may explain why so many
collection has this bug.
Fix
===
Only consider due value of new cards.
No need to reorder existing cards, which may have been manually
ordered by the user, when importing notes if we can give cards
a proper due number from the start. Retrieving any sibling's
due number for this is easy as all relevant cards will have
already been queried for when generating the new cards.
Users can now mark individual cards with one of four different coloured
flags, instead of relying on a tag that applied to the whole note.
- replaced marking functionality in reviewer and browser with new
flag options
- added flag:x search
- marked and leech tags now show in normal tag list in filter screen,
instead of being treated specially
- the other clients will need updating to set and shown the flags, but
flags set in the beta should be preserved by the other clients
we need to switch to autocommit mode before executing vacuums &
certain pragmas
also removed the pysqlite version workaround; we just use the
python-provided versions in all cases now as it is new enough