Commit Graph

11 Commits

Author SHA1 Message Date
Shyam Sunder 57193b5715 client+server: implement code autoformatting using prettier and black 2020-06-06 08:58:23 -04:00
rr- 4bc58a3c95 server: lint 2017-04-24 23:30:53 +02:00
rr- ba4df16499 server/search: add search term escaping 2017-04-24 21:59:38 +02:00
rr- 9814b132c3 server/search: fix searching for ---
Allow only one negation sign.
Also throw an error if user searches only for "-".
2017-04-24 19:55:02 +02:00
rr- ad842ee8a5 server: refactor + add type hinting
- Added type hinting (for now, 3.5-compatible)
- Split `db` namespace into `db` module and `model` namespace
- Changed elastic search to be created lazily for each operation
- Changed to class based approach in entity serialization to allow
  stronger typing
- Removed `required` argument from `context.get_*` family of functions;
  now it's implied if `default` argument is omitted
- Changed `unalias_dict` implementation to use less magic inputs
2017-02-05 16:34:45 +01:00
rr- 995cd4610d server: drop old style class declarations 2016-10-22 14:43:52 +02:00
rr- 560a7d6839 server/search: prefer arrays over ranges
(No, it doesn't work recursively.)
Also fix tests.
2016-09-26 22:48:09 +02:00
rr- 1bd8af47b0 server/search: match only [a-z-]* for named tokens
Adds ability to search for *:* for example. Still not perfect, but it's
a start.
2016-09-26 22:06:18 +02:00
rr- 9aea55e3d1 server/general: embrace most of PEP8
Ignored only the rules about continuing / hanging indentation.

Also, added __init__.py to tests so that pylint discovers them. (I don't
buy pytest's BS about installing your package.)
2016-08-14 16:44:03 +02:00
rr- f0d3589344 server/search: cache by query rather than its text 2016-06-03 19:47:09 +02:00
rr- 59ad5fe402 server/search: refactor, extract parsing 2016-06-03 19:47:09 +02:00