Commit graph

40 commits

Author SHA1 Message Date
Damien Elmes
28a9ba473d tweak search wording and tidy up API
- SearchTerm -> SearchNode
- Operator -> Joiner; share between messages
- build_search_string() supports specifying AND/OR as a convenience
- group_searches() makes it easier to negate
2021-02-11 19:57:19 +10:00
Damien Elmes
5ad2cd56d1 switch some existing code to use SearchTerm(negated=...) 2021-02-11 10:55:02 +10:00
Damien Elmes
42a44875ab convert qt strings to f-strings with flynt
Also revealed an incorrect type def in editor.py that mypy wasn't
noticing before :-(
2021-02-11 10:09:06 +10:00
Damien Elmes
bf7528d90a minor code cleanups with pyupgrade
- pyupgrade --py38-plus --keep-runtime-typing --keep-percent-format
- third-party mpv and winpaths excluded
2021-02-11 09:43:40 +10:00
Damien Elmes
9702532fc4 more typing updates 2021-02-02 23:31:55 +10:00
Damien Elmes
748aeb9df1 add a bunch of return types 2021-02-01 23:53:23 +10:00
Damien Elmes
83892eac51 add types to various other files
Mainly automated with MonkeyType
2021-02-01 22:08:56 +10:00
RumovZ
d3d18d34c5 Remove search button and reword search bar hint 2021-01-30 19:23:40 +01:00
RumovZ
2539747115 Manually namespace enum variants in SearchTerm
In protobuf "...enum values use C++ scoping rules, meaning that
enum values are siblings of their type, not children of it.
Therefore, [an enum variant] must be unique within [a message],
not just within [the enum.]"
So we must prefix enum variants with their enum's name, but can
also call them directly from the message namespace.
The protobuf crate is smart, though, and strips the prefixes.

(Simultaneously change some SearchTerm variant names.)
2021-01-30 17:56:29 +01:00
Damien Elmes
190922666b move Rating up a level
More ergonomic, and will allow reuse if we expose prop:rated in
the future.
2021-01-30 11:54:39 +10:00
Damien Elmes
dbe852431f use a separate enum for the is:* searches 2021-01-30 10:49:00 +10:00
Damien Elmes
e3f2b77c5b combine forgot_in_days and studied_today into a more general 'rated' 2021-01-30 10:26:23 +10:00
RumovZ
c7365abc9e Refactor search_string() and FilterToSearchIn
See #955.
2021-01-29 18:27:33 +01:00
RumovZ
12c97442c9 Rename filters added_in etc. to added_in_days 2021-01-29 09:38:13 +01:00
RumovZ
8d669724b1 Replace remaining literal searches in aqt 2021-01-28 11:19:07 +01:00
Damien Elmes
8075d46011 convert setWindowFlags call into helper, and fix invalid variables
"type: ignore" was masking the invalid references to self in places
like showText()
2021-01-07 14:24:49 +10:00
BlueGreenMagick
9a29d1b97a remove context help button 2021-01-06 22:15:48 +09:00
Damien Elmes
7e655614b2 fix remaining _() references; remove unused imports 2020-11-18 12:43:46 +10:00
Damien Elmes
2feddb3d70 update temporary val="%s" references to standard ftl 2020-11-17 22:00:44 +10:00
Damien Elmes
066b1498ae merge bulk of qt/ - designer files still to do 2020-11-17 17:42:43 +10:00
Damien Elmes
bc60d233e5 rebuild_filtered_deck() and new_filtered() 2020-09-03 18:02:47 +10:00
Damien Elmes
6f7f5686e8 empty_filtered_deck() 2020-09-03 17:43:07 +10:00
ANH
233e6abc55 add custom-study-must-rename-deck to Fluent 2020-08-19 18:27:14 +03:00
Arthur Milchior
71afb2b4d3 Remove useless variables 2020-07-17 08:38:48 +02:00
Damien Elmes
c6f8854ec8 Revert "Added parameter/return types, fixed possible logic error and typo" 2020-07-13 21:25:44 +10:00
Damien Elmes
178a8fb29e Update customstudy.py 2020-07-13 21:24:18 +10:00
zzzz
f6c0560660 Added some return and parameter types in customstudy.py, also fixed a possible logic error in plus function and a small typo 2020-07-13 01:32:08 -04:00
Damien Elmes
b90d20a3c1 fix custom study not saving 2020-05-22 11:25:11 +10:00
Damien Elmes
4d33b2d8f7 use qconnect everywhere, and fix some typing issues
a step towards check_untyped_defs in aqt, but there's still 100+
issues to resolve
2020-05-04 13:23:08 +10:00
Damien Elmes
4da189a48c grey out spinner if max=0
https://anki.tenderapp.com/discussions/ankidesktop/32710-custom-study
2020-04-10 20:32:48 +10:00
Damien Elmes
07c414692e preserve mtime/usn when syncing deck config, and add snake_case names 2020-04-03 19:34:46 +10:00
Arthur Milchior
e5b4dc62ae radioCram 2020-02-03 02:24:37 -08:00
Arthur Milchior
0a4641cc2d radioPreview 2020-02-03 02:24:37 -08:00
Arthur Milchior
e4d698e399 radioAhead 2020-02-03 02:24:37 -08:00
Arthur Milchior
1ffde9ca7f radioForgot 2020-02-03 02:24:37 -08:00
Arthur Milchior
d2007462da radiorRev 2020-02-03 02:24:37 -08:00
Arthur Milchior
46c62526d0 radioNew 2020-02-03 02:24:37 -08:00
Damien Elmes
dfcc81af08 fix formatting 2020-01-16 12:45:48 +10:00
Damien Elmes
552839fdce don't change current deck if custom study fails to create
just a quick fix for now

https://anki.tenderapp.com/discussions/ankidesktop/37834-bug-custom-study-session-created-even-when-there-are-no-cards-that-match-selected-criteria
2020-01-16 11:26:22 +10:00
Damien Elmes
2a00e0a6b0 tweaking the folder names again
hopefully that's the last of it
2020-01-03 07:48:38 +10:00
Renamed from anki-qt/aqt/customstudy.py (Browse further)