Commit graph

2356 commits

Author SHA1 Message Date
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
Damien Elmes
cbc64a939a enable pytype for anki/ 2019-12-16 17:38:43 +10:00
Damien Elmes
6f7cbcb956 fix incorrect marks not showing properly when typing answer
https://anki.tenderapp.com/discussions/ankidesktop/37513-thai-superscripts-not-checked
2019-12-16 14:39:54 +10: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
ff4cbd5f45 add missing mock req 2019-12-16 10:03:57 +10:00
Damien Elmes
88fb61abcc add extra qt import back to fix linting 2019-12-16 10:02:48 +10:00
Damien Elmes
8564b62d67 bundle sip-generated stubs
the PyQt5-stubs package that's floating around depends on an old
Qt, and throws a bunch of errors
2019-12-16 09:59:18 +10:00
Damien Elmes
1f11b72341 add aqt/ 2019-12-16 08:51:38 +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
7d0e0e7e36 clearer name for invalid column
https://github.com/dae/anki/pull/360
2019-12-12 09:54:26 +10: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
c840a561f9 fix unit tests 2019-12-09 13:00:15 +10:00
Damien Elmes
deb99e1fa6 tweak v2 label 2019-12-09 13:00:09 +10:00
Damien Elmes
2b94bf6ad9 preserve contextual formatting when wrapping text
https://anki.tenderapp.com/discussions/ankidesktop/37385-cloze-is-stripping-formatting-enlarging-text

any formatting inside the selection is removed, but formatting that
starts and ends outside the selection will be preserved
2019-12-09 12:52:18 +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
1d85722b58 fix bold/italics/underline regression 2019-12-09 09:46:16 +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
Damien Elmes
d0785d0cae Merge pull request #359 from Arthur-Milchior/noDefaultInDeckList2
list of decks contains default iff deck chooser contains default
2019-12-06 15:01:15 +10:00
Damien Elmes
8b3cf7e0fd clear undo when adding card
https://anki.tenderapp.com/discussions/ankidesktop/36541-anki-nuked-all-entered-notes-on-undo
2019-12-06 14:28:57 +10:00
Damien Elmes
19c641109a flagging requires a current card
https://anki.tenderapp.com/discussions/ankidesktop/37324-bug-report
2019-12-06 14:23:54 +10:00
Damien Elmes
00ec35e861 add hack to fix go>note
https://anki.tenderapp.com/discussions/ankidesktop/37328-browsergo-note
2019-12-06 14:22:49 +10:00
Damien Elmes
505bde0182 fix menu label inconsistency
https://anki.tenderapp.com/discussions/ankidesktop/37330-suggestion-ui
2019-12-06 14:17:02 +10:00
Damien Elmes
72dc6b7a74 handle formatting from google docs 2019-12-06 14:08:59 +10:00
Damien Elmes
14626aef54 preserve color in font tags
https://anki.tenderapp.com/discussions/ankidesktop/34688-format-of-copying
2019-12-06 13:44:06 +10:00
Damien Elmes
f9235a5482 strip bold/italics/underline when pasting without formatting
https://anki.tenderapp.com/discussions/ankidesktop/34413-formatting-is-not-fully-stripped-in-21
2019-12-06 13:40:51 +10:00
Damien Elmes
dab4e6526e preserve inline foreground/background color in spans
common in content pasted from MS Word
2019-12-06 13:39:05 +10:00
Damien Elmes
38ecbb8fb0 extended pasting is now the default 2019-12-06 13:37:50 +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
Damien Elmes
58651c7dec try 300ms preview delay
https://github.com/dae/anki/pull/357#issuecomment-560018459
2019-12-05 17:05:20 +10:00
Damien Elmes
6460de10a9 Merge pull request #357 from hakon-j-d-johnsen/fix-race-condition
Fix minor race condition in rendering of the preview window
2019-11-30 21:43:33 +13:00
Håkon J D Johnsen
d3fdac4ada Remove unnecessary lambda
Changing the signature of _renderScheduledPreview() made the
use of a lambda in _renderPreview() unnecessary. Remove it
to prevent linting errors.
2019-11-29 21:31:27 +01:00
Håkon J D Johnsen
f03333c9b3 Fix race condition in rendering of preview window
Previously, if repeated calls to _renderPreview() were throttled by
the throttling mechanism, only the most recent value of
cardChanged would take effect, even if the card had changed
in previous _renderPreview() calls.

After this patch, if any of the throttled _renderPreview() calls
were called with cardChanged=True, the final _renderScheduledPreview()
will happen with cardChanged=True
2019-11-29 21:27:50 +01:00
Damien Elmes
09c09ba5e5 Merge pull request #356 from Arthur-Milchior/correctNewTemplateTest
Another unimportant test error
2019-11-28 09:18:24 +13:00
Arthur Milchior
2472e151c0 correction 2019-11-27 08:10:37 +01:00
Damien Elmes
37521a05cd Merge pull request #355 from Arthur-Milchior/correctedNewFieldTest
Correcting a test
2019-11-26 08:15:03 +13: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
8ec631cc8c Merge pull request #354 from Arthur-Milchior/ignoreStickyFieldOnlyIfTheyDidntChanged
Ignore sticky field only if they didnt changed
2019-11-25 11:31:14 +13:00
Arthur Milchior
61290fa47e Use fieldsAreBlank with the previous note 2019-11-23 03:04:08 +01:00
Arthur Milchior
0df0d4d3a6 Fields are blank compare to previous note
So if a note is not empty but only because sticky fields didn't
change, then it's considered as empty and we can close the windows
without asking
2019-11-23 03:04:08 +01:00
Arthur Milchior
e169cda02f Add Cards save the previous note 2019-11-23 03:04:07 +01:00
Damien Elmes
83351ea515 minor grammar tweak 2019-11-14 09:27:25 +10:00