Commit graph

689 commits

Author SHA1 Message Date
Damien Elmes
0d3b80abd7 Merge pull request #866 from guillem-palau-salva/master
Update consts.py
2020-12-29 10:15:42 +10:00
Damien Elmes
ff0382ce11 Merge pull request #872 from RumovZ/fix-deck-check
Fix deck check and thus blue sync arrow bug
2020-12-29 10:11:59 +10:00
RumovZ
b4fa13aa0e Fix deck check and thus blue snyc arrow bug
Cast col.decks.selected() to int so the return type fits the annotation.
Thus, fix the comparison in col.decks.select() which was leading to
a superfluous db modification and in turn to a false indication of a
necessary sync right after another one in certain cases.
2020-12-29 00:29:36 +01:00
Guillem Palau-Salvà
2b5a6be3fa Update consts.py
I notices that type 4 is added in the revlog when rescheduling. Reviews are logged as 0 time and type 4.
2020-12-27 01:02:32 +01:00
Damien Elmes
d222686755 update to stable pyo3 0.13 release 2020-12-23 10:08:38 +10:00
Damien Elmes
25160daa90 tag the wheels as manual so test ... doesn't build them 2020-12-21 19:28:47 +10:00
Damien Elmes
250a45d32e possible fix for sync button colour blue after sync
If the client's clock is behind AnkiWeb's, even by a few seconds,
we can end up with a situation where last_begin_at is updated after
the sync to a value less than the mtime we received from AnkiWeb,
causing the collection to be saved, which bumps the modtime.

Work around this by recording mtime at begin() time, and seeing if it
has changed in either direction.

Thanks to Rumo, who did the hard work looking into it:
https://forums.ankiweb.net/t/why-is-my-sync-button-blue/2078/21
2020-12-21 19:27:26 +10:00
Damien Elmes
407b7f7410 tweak naming and move method into col.decks 2020-12-20 10:26:16 +10:00
k12ish
5da867c88a Added type hints, renamed kwarg 2020-12-19 18:12:58 +00:00
k12ish
9dc01bace1 Added method 2020-12-19 17:59:07 +00:00
Damien Elmes
faf992643a exhaustiveness checks on literals are now possible with the move to py38 2020-12-18 16:50:55 +10:00
Damien Elmes
9f3659a1d3 use QtMultimedia for recording instead of PyAudio
The unmute-on-first-duration-change approach is to try to prevent
clicks/pops that can happen at the start of recordings. If it doesn't
solve the problem, we may need to drop down to the lower-level
QAudioInput().

Closes https://github.com/ankitects/help-wanted/issues/23

May fix https://forums.ankiweb.net/t/anki-crashes-periodically-after-clicking-record-audio-button/5824,
which I suspect was caused by processEvents()
2020-12-16 19:33:25 +10:00
Damien Elmes
42f583f8a1 fix some warnings on startup 2020-12-16 15:38:24 +10:00
Damien Elmes
32a71c5418 remove conditional rsbackend_gen import
It causes PyCharm to think methods are missing on col.backend, and
should not be needed with the move to Bazel.
2020-12-16 13:30:54 +10:00
Damien Elmes
c28885d191 add type stub for _rsbridge to make PyCharm happy 2020-12-16 13:13:42 +10:00
Damien Elmes
5c93898e32 symlink generated .py/.pyi into tree to fix Python code completion 2020-12-16 11:36:42 +10:00
Damien Elmes
75a97d75ee add ability to specify an individual Python test 2020-12-16 10:40:29 +10:00
Damien Elmes
f7b87bb716 minor doc updates 2020-12-11 22:37:12 +10:00
Damien Elmes
7a95d7e189 remove unwanted leading '/' in wheel records 2020-12-10 23:02:18 +10:00
Damien Elmes
51635ff7e4 simplify wheel building 2020-12-10 20:27:21 +10:00
Damien Elmes
cf8cfcf97f drop unused i686 references
https://forums.ankiweb.net/t/changing-ankis-build-system-to-bazel/4737/9
2020-12-09 15:45:01 +10:00
Damien Elmes
1315d8b3c1 update Rust deps incl. Pyo3
This includes the refcount bug fix from pyo3 0.12.4
2020-12-01 16:48:45 +10:00
Damien Elmes
00d7a99562 expose Gaelic in language selection 2020-11-30 14:44:29 +10:00
Damien Elmes
2f9ddadf2c switch to workspace for Rust code 2020-11-24 18:41:03 +10:00
Damien Elmes
6a1cf40dcd Merge branch 'master' into init-lang 2020-11-22 16:10:49 +10:00
Damien Elmes
68311500b3 update remaining python format strings to Fluent 2020-11-22 14:57:53 +10:00
abdo
d06a9137b6 Set up default language before loading profile
We can make more strings translatable this way.
2020-11-21 05:29:23 +03:00
Damien Elmes
4043bd90bb Merge pull request #823 from RumovZ/rework-search-parser
Rework search parser
2020-11-20 16:22:12 +10:00
abdo
702c5712e4 Fix description of exporters
Description broke yet again with the full migration to Fluent
2020-11-19 23:52:46 +03:00
RumovZ
4e7a31250f Add Python test for tag whitespace
Assert tag matches do not occur across different tags.
2020-11-19 09:28:19 +01:00
RumovZ
f05e70a03e Merge branch 'master' into rework-search-parser
Conflicts:
    rslib/src/search/sqlwriter.rs
2020-11-18 09:04:04 +01:00
Damien Elmes
e271c63537 remove print statement from unit tests 2020-11-18 13:56:44 +10:00
Damien Elmes
ebd1236ab0 strip out unused gettext refs 2020-11-18 13:22:51 +10:00
Damien Elmes
7e655614b2 fix remaining _() references; remove unused imports 2020-11-18 12:43:46 +10:00
Damien Elmes
bd0919b7f1 update pylib ngettext references 2020-11-18 09:12:25 +10:00
Damien Elmes
346ec6880e drop i18n references in old stats 2020-11-18 09:12:03 +10:00
Damien Elmes
2feddb3d70 update temporary val="%s" references to standard ftl 2020-11-17 22:00:44 +10:00
Damien Elmes
1781e83252 merge pylib references 2020-11-17 19:23:06 +10:00
Damien Elmes
83cbe0d412 map gettext strings to keys/modules for ftl conversion 2020-11-17 14:11:09 +10:00
RumovZ
66241f642a Update frontend test to new escape handling 2020-11-15 09:39:10 +01:00
Damien Elmes
ad5cbf195f use full path in backend_pb2 import 2020-11-13 14:21:21 +10:00
Damien Elmes
a4af59fc4d format_fix -> format; rename svelte-check for consistency 2020-11-12 20:19:32 +10:00
Damien Elmes
c1e154e3ad update Python deps 2020-11-12 20:03:41 +10:00
Damien Elmes
dc9026e9d7 orjson was missing from dep list; drop 32 bit compat 2020-11-12 20:03:41 +10:00
Damien Elmes
db24dcf9a7 add coding specifier to anki/__init__.py
older gettext versions will complain otherwise (was breaking Windows CI)
2020-11-11 21:51:11 +10:00
Damien Elmes
593e9d4e7b Merge pull request #817 from cecini/formatcheck
Update mypy and black format check to python version 3.8
2020-11-11 21:36:32 +10:00
Damien Elmes
c62e6e61c2 update i18n scripts
- export updated .po files for consumption
- add a script to pull and push translations
2020-11-11 21:08:06 +10:00
cecini
28abd41925 Update mypy and black format check to python version 3.8 2020-11-11 09:24:28 +00:00
Damien Elmes
f8d402ee70 fix error exporting v2 collection when translations don't match
https://forums.ankiweb.net/t/utf8-error-in-importing-deck/4430/13
2020-11-11 15:42:08 +10:00
Damien Elmes
ec74cf6730 handle packaged pylib buildinfo.txt; drop aqt buildinfo 2020-11-11 10:33:49 +10:00