Damien Elmes
829f504740
Merge pull request #363 from ig3/bug/new-perday
...
Use _deckNewLimitSingle in _groupChildrenMain
2019-12-21 07:41:18 +10:00
Damien Elmes
92bdc5ff8a
add an example of how circular imports can be handled
...
The type name needs to be quoted so it is evaluated after the module
has been initialized.
In the future when we drop support for python 3.6, and mypy is updated,
we will be able to remove the quotes and use the following at
the top of the file instead:
from __future__ import annotations
2019-12-21 07:29:45 +10:00
Ian Goodacre
2ac26f03fd
Use _deckNewLimitSingle in _groupChildrenMain
2019-12-21 09:26:51 +13:00
Damien Elmes
8095ad8e4b
use isort to tidy up imports
2019-12-20 19:19:29 +10:00
Damien Elmes
96bb318c8e
add a bunch of extra hints for mypy
2019-12-20 16:40:20 +10:00
Damien Elmes
de89c72511
remove typings from some other files
...
not used frequently enough to deal with the mypy errors they're causing
at the moment
2019-12-20 16:33:49 +10:00
Damien Elmes
dc0fdaeea5
add a bunch of annotations for mypy
2019-12-20 15:07:40 +10:00
Damien Elmes
f08ef66550
fix media.check() sig
2019-12-20 11:58:50 +10:00
Damien Elmes
19311514f7
exporting, latex
2019-12-20 11:47:19 +10:00
Damien Elmes
85e1a1c772
importing
2019-12-20 11:41:24 +10:00
Damien Elmes
9f960bc38e
lang/media/storage
2019-12-20 11:27:01 +10:00
Damien Elmes
a65d91267c
decks
2019-12-20 11:07:08 +10:00
Damien Elmes
594a2c14b7
models
2019-12-20 11:07:08 +10:00
Damien Elmes
6818234679
db/hooks/utils
2019-12-20 11:07:08 +10:00
Damien Elmes
0c5d1db81d
collection
2019-12-20 11:07:08 +10:00
Damien Elmes
5b776971f8
cards/notes
2019-12-20 11:07:08 +10:00
Damien Elmes
87d37c7889
type hints for scheduler
2019-12-20 11:07:08 +10:00
Damien Elmes
9983774a12
add pytype inferred types to anki/
...
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.
2019-12-20 11:07:08 +10:00
Damien Elmes
f70e439d95
Revert "DeckManager: _checkDeckTree ignore case"
...
This reverts commit a6dab26d45 .
This commit broke collections that had children under each of the
the duplicate names - it renames one of the decks, but the children
of the renamed deck are left without a parent, causing an error like
line 235, in deckDueList nlim = min(nlim, lims[p][0])\n\nKeyError('..)
Rather than a more complicated approach, I think it's safer just to
leave the case or normalization-differing decks around for now, and
we can normalize things properly in a future schema upgrade.
2019-12-20 08:18:01 +10:00
Damien Elmes
6b78cf8d68
don't set local offset in server mode
2019-12-17 17:10:56 +10:00
Damien Elmes
bcb469f3e4
Merge pull request #361 from Arthur-Milchior/testReqs
...
test req
2019-12-16 20:44:23 +10:00
Damien Elmes
0e1118aab4
avoid recalculating reqs in actions like adding cards
2019-12-16 20:27:58 +10:00
Damien Elmes
99181ce986
fixes cycles in template imports
2019-12-16 18:16:26 +10:00
Damien Elmes
78fd924525
don't try to decode str
2019-12-16 18:08:17 +10:00
Damien Elmes
a4914b75ac
clarify hasIllegal() arg
2019-12-16 17:54:57 +10:00
Damien Elmes
53ffd13c98
mpv was passing separators incorrectly and unnecessarily
2019-12-16 17:54:40 +10:00
Damien Elmes
6a72b9eedc
fix type inference in scheduler
2019-12-16 17:54:17 +10:00
Damien Elmes
2e4a46e87b
fix mplayer typecheck
2019-12-16 17:54:04 +10:00
Damien Elmes
b23c7b07f4
handle invalid field mod regex
2019-12-16 17:53:43 +10:00
Damien Elmes
3304e74f10
Sniffer technically expects a string, not a list
2019-12-16 17:53:20 +10:00
Damien Elmes
7fe4a7c4ef
work around some typing inference issues
2019-12-16 17:52:51 +10:00
Damien Elmes
513aef78cf
platform-specific imports
2019-12-16 17:51:33 +10:00
Damien Elmes
2610099885
ignore missing props in the supermemo importer
2019-12-16 17:50:43 +10:00
Damien Elmes
14b7828135
set instance vars in __init__()
2019-12-16 17:49:32 +10:00
Damien Elmes
e15bed745f
be explicit in our not-None assumptions to appease type checker
2019-12-16 17:47:07 +10:00
Damien Elmes
41940c8575
pytype is confused by import from parent module
...
this change prevents the cache from constantly being rebuilt
2019-12-16 17:41:47 +10:00
Arthur Milchior
5afc93d8c8
update requireds saves reqs as lists instead of tuples.
...
The goal of this change is to be consistent with JSON. Indeed, the
dictionnary is saved as JSON, which has list and does not has
tuple. The request was made in https://github.com/dae/anki/pull/361#issuecomment-565915191
2019-12-15 22:55:29 -08:00
Damien Elmes
6e19639a8c
don't try to remove tmp folder if it's already been removed
2019-12-16 10:07:20 +10:00
Damien Elmes
df69b03995
fix travis build
2019-12-16 08:22:47 +10:00
Damien Elmes
fb6b53e234
add basic type checking for anki/
2019-12-16 08:17:28 +10:00
Damien Elmes
33685461d0
bump version
2019-12-15 15:32:24 +10:00
Damien Elmes
ba2d5df16c
save local timezone to conf
...
saves the user needing to visit AnkiWeb when their timezone has changed
2019-12-12 11:30:01 +11:00
Damien Elmes
d99cca56cf
sort due in filtered decks by ordinal, like normal review
...
https://anki.tenderapp.com/discussions/ankidesktop/37419-card-order-of-siblings-not-preserved-in-filtered-deck#comment_47910714
2019-12-11 08:12:50 +10:00
Damien Elmes
79ab33ee49
add a token 1 day bonus so easy on a relearn card differs from good
...
https://anki.tenderapp.com/discussions/beta-testing/1589-anki-2116-beta#comment_47905454
2019-12-09 12:12:29 +10:00
Damien Elmes
39f6c9fa2b
allow importing scheduling-inclusive v1 imports into v2
2019-12-06 19:03:57 +10:00
Damien Elmes
f8d17a90af
enable scheduling-inclusive exports from 2.1
2019-12-06 18:51:42 +10:00
Damien Elmes
0a13c340d3
default to v2 scheduler on new installs, remove warning
2019-12-06 18:37:39 +10:00
Arthur Milchior
eba789db53
list of decks contains default iff deck chooser contains default
...
This way, the list is consistent with what users see otherwhere
2019-12-05 08:20:11 +01:00
Arthur Milchior
d6b0f225a0
newField checks its input is a str
...
Indeed, it takes as input a name (str). For some reason in some test
it was given a model. This actually led to some strange failed test.
2019-11-25 00:15:20 +01:00
Damien Elmes
83351ea515
minor grammar tweak
2019-11-14 09:27:25 +10:00