mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-21 13:02:40 +00:00
Chore: type the OCR template serializers
Validated zone data and the serializer methods were untyped, so the checkers could not follow zones through validation and saving. Add a ZoneData TypedDict, annotate the methods and add serializer generics.
This commit is contained in:
1 parent
a9ad9d9d65
commit
d4f435de7d
2 files changed
+111
-71
No files matched your search
@@ -896,13 +896,6 @@
|
||||
"concise_description": "Unexpected keyword argument `fast` in function `tantivy.tantivy.SchemaBuilder.add_json_field`",
|
||||
"severity": "error"
|
||||
},
|
||||
{
|
||||
"column": 9,
|
||||
"path": "src/documents/serialisers.py",
|
||||
"name": "bad-override-param-name",
|
||||
"concise_description": "Class member `MatchingModelSerializer.validate` overrides parent class `ModelSerializer` in an inconsistent manner",
|
||||
"severity": "error"
|
||||
},
|
||||
{
|
||||
"column": 62,
|
||||
"path": "src/documents/serialisers.py",
|
||||
@@ -952,13 +945,6 @@
|
||||
"concise_description": "Cannot set item in `Mapping[str, Any]`",
|
||||
"severity": "error"
|
||||
},
|
||||
{
|
||||
"column": 9,
|
||||
"path": "src/documents/serialisers.py",
|
||||
"name": "bad-override-param-name",
|
||||
"concise_description": "Class member `TagSerializer.validate` overrides parent class `MatchingModelSerializer` in an inconsistent manner",
|
||||
"severity": "error"
|
||||
},
|
||||
{
|
||||
"column": 17,
|
||||
"path": "src/documents/serialisers.py",
|
||||
|
||||
Reference in new issue
Block a user