mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
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
This commit is contained in:
14
server/mypy.ini
Normal file
14
server/mypy.ini
Normal file
@ -0,0 +1,14 @@
|
||||
[mypy]
|
||||
ignore_missing_imports = True
|
||||
follow_imports = skip
|
||||
disallow_untyped_calls = True
|
||||
disallow_untyped_defs = True
|
||||
check_untyped_defs = True
|
||||
disallow_subclassing_any = False
|
||||
warn_redundant_casts = True
|
||||
warn_unused_ignores = True
|
||||
strict_optional = True
|
||||
strict_boolean = False
|
||||
|
||||
[mypy-szurubooru.tests.*]
|
||||
ignore_errors=True
|
Reference in New Issue
Block a user