Commit Graph

19 Commits

Author SHA1 Message Date
Shyam Sunder 9b3123a815 server: fix python docstring formatting 2021-11-29 18:39:34 -05:00
Shyam Sunder 57193b5715 client+server: implement code autoformatting using prettier and black 2020-06-06 08:58:23 -04:00
rr- c9cb9aa539 server/password-reset: try to construct full URL 2018-07-08 10:10:06 +02:00
rr- 7f09306dde server/api: fix unicode urls (#121) 2017-02-07 18:03:35 +01: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- abf1fc2b2d server: make linters happier 2017-02-03 22:42:14 +01:00
rr- af6c35ed6b server/rest: rollback session on query exception
Kills complaints from sqlalchemy when an error happens during
insertion/update hook.
2017-02-02 19:46:03 +01:00
rr- 6b42d787a7 server: fix problems with escaping 2017-01-21 00:22:53 +01:00
rr- 902a0d3fe0 server/db: fix closing DB sessions
Certain exception scenarios led to small disasters. Moved database
session management directly to router, since it's that sensitive.
2017-01-03 21:29:48 +01:00
rr- ef079121a9 server/rest: simplify error handling flow 2017-01-03 21:17:41 +01:00
rr- e8c93cd735 server: fix constructing of HTTP errors
When I added error codes, I missed these exceptions.
2016-09-26 22:51:07 +02:00
rr- 42b7a9b94f server/errors: fix serializing errors 2016-09-10 15:28:32 +02:00
rr- 16d04adde0 server/errors: add and document error codes 2016-09-10 11:36:01 +02:00
rr- 0a19e7bbd0 server/errors: allow extra info in errors 2016-09-10 10:16:14 +02:00
rr- 65119d69ab server/rest: urldecode incoming paths 2016-08-16 21:42:11 +02:00
rr- 0c2efc0be5 server/rest: work around Python bug 27777
(See http://bugs.python.org/issue27777)
2016-08-16 21:42:11 +02:00
rr- e89a086d58 server/rest: fix reporting parameter type errors 2016-08-16 21:42:11 +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- af62f8c45a server/general: ditch falcon for in-house WSGI app
For quite some time, I hated Falcon's class maps approach that caused
more chaos than good for Szurubooru. I've taken a look at the other
frameworks (hug, flask, etc) again, but they all looked too
bloated/over-engineered. I decided to just talk to WSGI myself.

Regex-based routing may not be the fastest in the world, but I'm fine
with response time of 10 ms for cached /posts.
2016-08-14 16:43:35 +02:00