Anki/pylib/anki
Damien Elmes 59ccfe5918 more search bikeshedding
While implementing the overdue search, I realised it would be nice to
be able to construct a search string with OR and NOT searches without
having to construct each part individually with build_search_string().

Changes:

- Extends SearchTerm to support a text search, which will be parsed
by the backend. This allows us to do things like wrap text in a group
or NOT node.
- Because SearchTerm->Node conversion can now fail with a parsing error,
it's switched over to TryFrom
- Switch concatenate_searches and replace_search_term to use SearchTerms,
so that they too don't require separate string building steps.
- Remove the unused normalize_search()
- Remove negate_search, as this is now an operation on a Node, and
users can wrap their search in SearchTerm(negated=...)
- Remove the match_any and negate args from build_search_string

Having done all this work, I've just realised that perhaps the original
JSON idea was more feasible than I first thought - if we wrote it out
to a string and re-parsed it, we would be able to leverage the existing
checks that occur at parsing stage.
2021-02-11 17:11:17 +10:00
..
_backend minor code cleanups with pyupgrade 2021-02-11 09:43:40 +10:00
importing convert some pylib strings to f-strings with flynt 2021-02-11 09:51:09 +10:00
syncserver update to latest mypy_protobuf 2021-02-03 13:31:52 +10:00
__init__.py minor code cleanups with pyupgrade 2021-02-11 09:43:40 +10:00
BUILD.bazel fix _backend files not getting format checked 2021-01-31 18:56:16 +10:00
buildinfo.py fix some warnings on startup 2020-12-16 15:38:24 +10:00
cards.py convert some pylib strings to f-strings with flynt 2021-02-11 09:51:09 +10:00
collection.py more search bikeshedding 2021-02-11 17:11:17 +10:00
config.py add more typing, and enable checks for missing types for most of pylib 2021-01-31 21:38:36 +10:00
consts.py add some typehints, and remove some unused code 2021-01-31 20:56:21 +10:00
db.py add some typehints, and remove some unused code 2021-01-31 20:56:21 +10:00
dbproxy.py add some typehints, and remove some unused code 2021-01-31 20:56:21 +10:00
decks.py convert some pylib strings to f-strings with flynt 2021-02-11 09:51:09 +10:00
errors.py convert some pylib strings to f-strings with flynt 2021-02-11 09:51:09 +10:00
exporting.py minor code cleanups with pyupgrade 2021-02-11 09:43:40 +10:00
find.py add more typing, and enable checks for missing types for most of pylib 2021-01-31 21:38:36 +10:00
hooks.py add more typing, and enable checks for missing types for most of pylib 2021-01-31 21:38:36 +10:00
hooks_gen.py symlink generated .py/.pyi into tree to fix Python code completion 2020-12-16 11:36:42 +10:00
httpclient.py minor code cleanups with pyupgrade 2021-02-11 09:43:40 +10:00
lang.py fix rsbackend compat issues 2021-02-08 09:51:51 +10:00
latex.py convert some pylib strings to f-strings with flynt 2021-02-11 09:51:09 +10:00
media.py convert some pylib strings to f-strings with flynt 2021-02-11 09:51:09 +10:00
models.py convert some pylib strings to f-strings with flynt 2021-02-11 09:51:09 +10:00
notes.py Remove unused imports 2021-02-02 17:13:35 +01:00
py.typed mark anki and aqt modules as having typing info 2020-01-13 13:03:37 +10:00
rsbackend.py fix rsbackend compat issues 2021-02-08 09:51:51 +10:00
sched.py convert some pylib strings to f-strings with flynt 2021-02-11 09:51:09 +10:00
schedv2.py convert some pylib strings to f-strings with flynt 2021-02-11 09:51:09 +10:00
sound.py support speed control in tts tags 2020-01-26 14:31:07 +10:00
stats.py use top level defs for protobuf enum cases 2021-02-05 19:26:13 +10:00
statsbg.py tweaking the folder names again 2020-01-03 07:48:38 +10:00
stdmodels.py update to latest mypy_protobuf 2021-02-03 13:31:52 +10:00
storage.py storage->collection 2020-05-20 17:58:28 +10:00
sync.py start work on more clearly defining backend/protobuf boundaries 2021-01-31 18:55:45 +10:00
tags.py convert some pylib strings to f-strings with flynt 2021-02-11 09:51:09 +10:00
template.py convert some pylib strings to f-strings with flynt 2021-02-11 09:51:09 +10:00
types.py move remaining Filter button items into sidebar 2021-02-05 18:58:22 +10:00
utils.py convert some pylib strings to f-strings with flynt 2021-02-11 09:51:09 +10:00
wheel_description.txt move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00