mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-29 00:11:59 +00:00
Compare commits
27
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
131f927d94 | ||
|
|
d414a6e961 | ||
|
|
000d48f38d | ||
|
|
4d19cb8106 | ||
|
|
976920d6d1 | ||
|
|
0347ac7cae | ||
|
|
6ddc6f74a7 | ||
|
|
cdbcf8c0b0 | ||
|
|
5563277dcf | ||
|
|
c87084206a | ||
|
|
7db96d8b7a | ||
|
|
2d6819ecc7 | ||
|
|
04e9cabbd5 | ||
|
|
04056505be | ||
|
|
e9e8389544 | ||
|
|
f0fdb0e51e | ||
|
|
58b68767b3 | ||
|
|
a66e52020f | ||
|
|
e9d221a83f | ||
|
|
5e33952e6b | ||
|
|
bd6dda80e4 | ||
|
|
1aed6ce3fd | ||
|
|
d3506c11cd | ||
|
|
a4b6c256d3 | ||
|
|
610eb9ce41 | ||
|
|
f57210d057 | ||
|
|
b3faa38f15 |
No files matched your search
+85
-181
@@ -17,6 +17,7 @@ src/documents/admin.py:0: error: Missing type arguments for generic type "Tabula
|
||||
src/documents/admin.py:0: error: Missing type arguments for generic type "TabularInline" [type-arg]
|
||||
src/documents/admin.py:0: error: Skipping analyzing "auditlog.admin": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/admin.py:0: error: Skipping analyzing "auditlog.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/admin.py:0: error: Skipping analyzing "treenode.admin": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/barcodes.py:0: error: "Image" has no attribute "filename" [attr-defined]
|
||||
src/documents/bulk_download.py:0: error: Return type "None" of "add_document" incompatible with return type "Never" in supertype "BulkArchiveStrategy" [override]
|
||||
src/documents/bulk_download.py:0: error: Return type "None" of "add_document" incompatible with return type "Never" in supertype "BulkArchiveStrategy" [override]
|
||||
@@ -38,13 +39,10 @@ src/documents/bulk_edit.py:0: error: Invalid index type "str" for "dict[FieldDat
|
||||
src/documents/bulk_edit.py:0: error: List comprehension has incompatible type List[tuple[int, Any]]; expected List[int] [misc]
|
||||
src/documents/bulk_edit.py:0: error: List comprehension has incompatible type List[tuple[int, None]]; expected List[int] [misc]
|
||||
src/documents/bulk_edit.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/bulk_edit.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/bulk_edit.py:0: error: Need type annotation for "to_create" (hint: "to_create: list[<type>] = ...") [var-annotated]
|
||||
src/documents/bulk_edit.py:0: error: Skipping analyzing "auditlog.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/bulk_edit.py:0: error: Unexpected keyword argument "transaction_id" for "delete" of "QuerySet" [call-arg]
|
||||
src/documents/bulk_operations.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/bulk_operations.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/bulk_operations.py:0: error: Skipping analyzing "auditlog.context": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/bulk_operations.py:0: error: Skipping analyzing "auditlog.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/caching.py:0: error: Argument 1 to "hexlify" has incompatible type "bytes | None"; expected "Buffer" [arg-type]
|
||||
src/documents/caching.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/caching.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -115,7 +113,6 @@ src/documents/consumer.py:0: error: Argument "logger" to "run_subprocess" has in
|
||||
src/documents/consumer.py:0: error: Argument "text" to "_store" of "ConsumerPlugin" has incompatible type "str | Any | None"; expected "str" [arg-type]
|
||||
src/documents/consumer.py:0: error: Argument 1 to "compute_checksum" has incompatible type "Path | None"; expected "Path" [arg-type]
|
||||
src/documents/consumer.py:0: error: Argument 1 to "create_source_path_directory" has incompatible type "Path | None"; expected "Path" [arg-type]
|
||||
src/documents/consumer.py:0: error: Argument 1 to "get_value_field_name" of "CustomFieldInstance" has incompatible type "str"; expected "FieldDataType" [arg-type]
|
||||
src/documents/consumer.py:0: error: Argument 1 to "validate_path_in_root" has incompatible type "Path | None"; expected "Path" [arg-type]
|
||||
src/documents/consumer.py:0: error: Argument 2 to "parse_w_workflow_placeholders" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
src/documents/consumer.py:0: error: Argument 3 to "parse_w_workflow_placeholders" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
@@ -137,12 +134,19 @@ src/documents/consumer.py:0: error: Item "None" of "Document | None" has no attr
|
||||
src/documents/consumer.py:0: error: List item 2 has incompatible type "Path"; expected "str" [list-item]
|
||||
src/documents/consumer.py:0: error: Return type "ConsumeFileSuccessResult" of "run" incompatible with return type "str | None" in supertype "documents.plugins.base.ConsumeTaskPlugin" [override]
|
||||
src/documents/consumer.py:0: error: Too many arguments for "__init__" of "object" [call-arg]
|
||||
src/documents/consumer.py:0: error: Value of type "dict[Any, Any] | None" is not indexable [index]
|
||||
src/documents/context_processors.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/converters.py:0: error: List item 3 has incompatible type "Path"; expected "str" [list-item]
|
||||
src/documents/converters.py:0: error: List item 4 has incompatible type "Path"; expected "str" [list-item]
|
||||
src/documents/converters.py:0: error: Skipping analyzing "img2pdf": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/data_models.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/data_models.py:0: error: Incompatible types in assignment (expression has type "None", variable has type "str") [assignment]
|
||||
src/documents/data_models.py:0: error: Item "Group" of "Group | dict[Any, Any]" has no attribute "__iter__" (not iterable) [union-attr]
|
||||
src/documents/data_models.py:0: error: Item "Group" of "Group | dict[Any, Any]" has no attribute "__iter__" (not iterable) [union-attr]
|
||||
src/documents/data_models.py:0: error: Item "list[str]" of "Any | list[str]" has no attribute "values_list" [union-attr]
|
||||
src/documents/data_models.py:0: error: Item "list[str]" of "Any | list[str]" has no attribute "values_list" [union-attr]
|
||||
src/documents/data_models.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/data_models.py:0: error: Value of type "Group | dict[Any, Any]" is not indexable [index]
|
||||
src/documents/data_models.py:0: error: Value of type "Group | dict[Any, Any]" is not indexable [index]
|
||||
src/documents/export/sinks.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/export/sinks.py:0: error: Missing type arguments for generic type "AbstractContextManager" [type-arg]
|
||||
src/documents/export/sinks.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
@@ -191,8 +195,6 @@ src/documents/filters.py:0: error: Function is missing a type annotation [no-un
|
||||
src/documents/filters.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/filters.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/filters.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/filters.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/filters.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/filters.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/filters.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/filters.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -202,7 +204,6 @@ src/documents/filters.py:0: error: Function is missing a type annotation for one
|
||||
src/documents/filters.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/filters.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/filters.py:0: error: Incompatible types in assignment (expression has type "CharField", variable has type "BooleanField | None") [assignment]
|
||||
src/documents/filters.py:0: error: Incompatible types in assignment (expression has type "DateQueryField", variable has type "BooleanField | None") [assignment]
|
||||
src/documents/filters.py:0: error: Incompatible types in assignment (expression has type "Field[Any, Any, Any, Any]", variable has type "BooleanField | None") [assignment]
|
||||
src/documents/filters.py:0: error: Incompatible types in assignment (expression has type "IntegerField", variable has type "BooleanField | None") [assignment]
|
||||
src/documents/filters.py:0: error: Incompatible types in assignment (expression has type "ListField", variable has type "BooleanField | None") [assignment]
|
||||
@@ -232,6 +233,7 @@ src/documents/management/commands/document_consumer.py:0: error: Function is mis
|
||||
src/documents/management/commands/document_consumer.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/management/commands/document_consumer.py:0: error: Incompatible types in assignment (expression has type "Path", variable has type "str") [assignment]
|
||||
src/documents/management/commands/document_create_classifier.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/management/commands/document_exporter.py:0: error: Argument 1 to "add" of "set" has incompatible type "Path"; expected "str" [arg-type]
|
||||
src/documents/management/commands/document_exporter.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/management/commands/document_exporter.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/management/commands/document_exporter.py:0: error: Incompatible types in assignment (expression has type "str", variable has type "Path") [assignment]
|
||||
@@ -285,6 +287,8 @@ src/documents/management/commands/prune_audit_logs.py:0: error: Function is miss
|
||||
src/documents/management/commands/prune_audit_logs.py:0: error: Skipping analyzing "auditlog.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/matching.py:0: error: Argument 1 to "existing_document_matches_workflow" has incompatible type "ConsumableDocument | Document"; expected "Document" [arg-type]
|
||||
src/documents/matching.py:0: error: Argument 1 to "issubset" of "set" has incompatible type "set[int] | None"; expected "Iterable[object]" [arg-type]
|
||||
src/documents/matching.py:0: error: Argument 1 to "matches" has incompatible type "WorkflowTrigger"; expected "MatchingModel" [arg-type]
|
||||
src/documents/matching.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/matching.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/matching.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/matching.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
@@ -337,12 +341,21 @@ src/documents/models.py:0: error: Function is missing a type annotation [no-unt
|
||||
src/documents/models.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/models.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/models.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/models.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/models.py:0: error: Signature of "delete" incompatible with supertype "django.db.models.base.Model" [override]
|
||||
src/documents/models.py:0: error: Skipping analyzing "auditlog.registry": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/models.py:0: error: Skipping analyzing "django_softdelete.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/models.py:0: error: Skipping analyzing "multiselectfield": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/models.py:0: error: Skipping analyzing "treenode.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/models.py:0: error: Unexpected keyword argument "transaction_id" for "delete" of "Model" [call-arg]
|
||||
src/documents/models.py:0: error: Unexpected keyword argument "transaction_id" for "delete" of "QuerySet" [call-arg]
|
||||
src/documents/parsers.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/parsers.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/parsers.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/parsers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/parsers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/parsers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/parsers.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/parsers.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/parsers.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/parsers.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -354,14 +367,21 @@ src/documents/permissions.py:0: error: Function is missing a return type annotat
|
||||
src/documents/permissions.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/permissions.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/permissions.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/permissions.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/permissions.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/permissions.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/permissions.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/permissions.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/permissions.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/permissions.py:0: error: Incompatible return value type (got "QuerySet[Model, ModelT]", expected "QuerySet[ModelT, ModelT]") [return-value]
|
||||
src/documents/permissions.py:0: error: Item "list[str]" of "Any | list[str] | QuerySet[User, User]" has no attribute "exclude" [union-attr]
|
||||
src/documents/permissions.py:0: error: Item "list[str]" of "Any | list[str] | QuerySet[User, User]" has no attribute "exists" [union-attr]
|
||||
src/documents/permissions.py:0: error: Item "list[str]" of "Any | list[str] | QuerySet[User, User]" has no attribute "exists" [union-attr]
|
||||
src/documents/permissions.py:0: error: Missing type arguments for generic type "QuerySet" [type-arg]
|
||||
src/documents/permissions.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/permissions.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/permissions.py:0: error: Missing type arguments for generic type "list" [type-arg]
|
||||
src/documents/permissions.py:0: error: Type argument "int" of "QuerySet" must be a subtype of "Model" [type-var]
|
||||
src/documents/permissions.py:0: error: Type argument "int" of "QuerySet" must be a subtype of "Model" [type-var]
|
||||
src/documents/permissions.py:0: error: TypedDict key must be a string literal; expected one of ("users", "groups") [literal-required]
|
||||
src/documents/plugins/helpers.py:0: error: Skipping analyzing "channels_redis.pubsub": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/regex.py:0: error: "error" has no attribute "msg" [attr-defined]
|
||||
src/documents/regex.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
@@ -377,7 +397,6 @@ src/documents/search/_backend.py:0: error: Argument "args" to "apply_async" of "
|
||||
src/documents/search/_backend.py:0: error: Argument "args" to "apply_async" of "Task" has incompatible type "list[int]"; expected "tuple[Any, ...] | None" [arg-type]
|
||||
src/documents/search/_backend.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/search/_backend.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/search/_backend.py:0: error: Incompatible types in assignment (expression has type "Document | None", variable has type "Document") [assignment]
|
||||
src/documents/search/_backend.py:0: error: Incompatible types in assignment (expression has type "SoftFileLock", variable has type "None") [assignment]
|
||||
src/documents/search/_backend.py:0: error: List comprehension has incompatible type List[tuple[DocAddress, Any]]; expected List[tuple[DocAddress]] [misc]
|
||||
src/documents/search/_backend.py:0: error: List comprehension has incompatible type List[tuple[DocAddress, Any]]; expected List[tuple[DocAddress]] [misc]
|
||||
@@ -390,6 +409,7 @@ src/documents/search/_query.py:0: error: Argument 3 to "Term" has incompatible t
|
||||
src/documents/search/_query.py:0: error: Argument 3 to "Term" has incompatible type "**dict[str, int | None]"; expected "bool" [arg-type]
|
||||
src/documents/search/_query.py:0: error: Unexpected keyword argument "children" for "Node" [call-arg]
|
||||
src/documents/search/_schema.py:0: error: Redundant cast to "Path" [redundant-cast]
|
||||
src/documents/search/_schema.py:0: error: Unexpected keyword argument "fast" for "add_json_field" of "SchemaBuilder" [call-arg]
|
||||
src/documents/serialisers.py:0: error: "type[_MT?]" has no attribute "_meta" [attr-defined]
|
||||
src/documents/serialisers.py:0: error: "type[_MT?]" has no attribute "objects" [attr-defined]
|
||||
src/documents/serialisers.py:0: error: "type[_MT?]" has no attribute "objects" [attr-defined]
|
||||
@@ -399,12 +419,8 @@ src/documents/serialisers.py:0: error: Argument "default" to "MultipleChoiceFiel
|
||||
src/documents/serialisers.py:0: error: Argument 1 of "get_value" is incompatible with supertype "rest_framework.fields.Field"; supertype defines the argument type as "Mapping[str, Any]" [override]
|
||||
src/documents/serialisers.py:0: error: Argument 1 of "update" is incompatible with supertype "rest_framework.serializers.BaseSerializer"; supertype defines the argument type as "dict[str, Any]" [override]
|
||||
src/documents/serialisers.py:0: error: Argument 1 to "__get__" of "BaseManager" has incompatible type "PrimaryKeyRelatedField[Any]"; expected "Options[Any] | None" [arg-type]
|
||||
src/documents/serialisers.py:0: error: Argument 1 to "__get__" of "BaseManager" has incompatible type "PrimaryKeyRelatedField[Any]"; expected "Options[Any] | None" [arg-type]
|
||||
src/documents/serialisers.py:0: error: Argument 1 to "__get__" of "BaseManager" has incompatible type "PrimaryKeyRelatedField[Any]"; expected "Options[Any] | None" [arg-type]
|
||||
src/documents/serialisers.py:0: error: Argument 1 to "__get__" of "BaseManager" has incompatible type "PrimaryKeyRelatedField[Any]"; expected "Options[Any] | None" [arg-type]
|
||||
src/documents/serialisers.py:0: error: Argument 1 to "__get__" of "BaseManager" has incompatible type "PrimaryKeyRelatedField[Any]"; expected "Options[Any] | None" [arg-type]
|
||||
src/documents/serialisers.py:0: error: Argument 1 to "get_value_field_name" of "CustomFieldInstance" has incompatible type "str"; expected "FieldDataType" [arg-type]
|
||||
src/documents/serialisers.py:0: error: Argument 1 to "int" has incompatible type "Any | Collection[str]"; expected "str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc" [arg-type]
|
||||
src/documents/serialisers.py:0: error: Argument 1 to "int" has incompatible type "Any | Collection[str]"; expected "str | Buffer | SupportsInt | SupportsIndex" [arg-type]
|
||||
src/documents/serialisers.py:0: error: Argument 1 to "list" has incompatible type "QuerySet[Document, TypedDict({'id': int, 'title': str, 'deleted_at': datetime | None})]"; expected "Iterable[dict[str, Any]]" [arg-type]
|
||||
src/documents/serialisers.py:0: error: Expected iterable as variadic argument [misc]
|
||||
src/documents/serialisers.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
@@ -414,6 +430,11 @@ src/documents/serialisers.py:0: error: Function is missing a return type annotat
|
||||
src/documents/serialisers.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
@@ -482,7 +503,6 @@ src/documents/serialisers.py:0: error: Function is missing a type annotation [n
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/serialisers.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -534,6 +554,8 @@ src/documents/serialisers.py:0: error: Incompatible types in assignment (express
|
||||
src/documents/serialisers.py:0: error: Item "Field[Any, Any, Any, Any]" of "Field[Any, Any, Any, Any] | None" has no attribute "fetch_documents" [union-attr]
|
||||
src/documents/serialisers.py:0: error: Item "Field[Any, Any, Any, Any]" of "Field[Any, Any, Any, Any] | None" has no attribute "get_shared_object_pks" [union-attr]
|
||||
src/documents/serialisers.py:0: error: Item "Field[Any, Any, Any, Any]" of "Field[Any, Any, Any, Any] | None" has no attribute "get_shared_object_pks" [union-attr]
|
||||
src/documents/serialisers.py:0: error: Item "None" of "Any | None" has no attribute "name" [union-attr]
|
||||
src/documents/serialisers.py:0: error: Item "None" of "Any | None" has no attribute "pk" [union-attr]
|
||||
src/documents/serialisers.py:0: error: Item "None" of "CustomField | None" has no attribute "name" [union-attr]
|
||||
src/documents/serialisers.py:0: error: Item "None" of "Field[Any, Any, Any, Any] | None" has no attribute "context" [union-attr]
|
||||
src/documents/serialisers.py:0: error: Item "None" of "Field[Any, Any, Any, Any] | None" has no attribute "context" [union-attr]
|
||||
@@ -541,10 +563,15 @@ src/documents/serialisers.py:0: error: Item "None" of "Field[Any, Any, Any, Any]
|
||||
src/documents/serialisers.py:0: error: Item "None" of "Field[Any, Any, Any, Any] | None" has no attribute "fetch_documents" [union-attr]
|
||||
src/documents/serialisers.py:0: error: Item "None" of "Field[Any, Any, Any, Any] | None" has no attribute "get_shared_object_pks" [union-attr]
|
||||
src/documents/serialisers.py:0: error: Item "None" of "Field[Any, Any, Any, Any] | None" has no attribute "get_shared_object_pks" [union-attr]
|
||||
src/documents/serialisers.py:0: error: Item "list[str]" of "Any | list[str]" has no attribute "values_list" [union-attr]
|
||||
src/documents/serialisers.py:0: error: Missing type arguments for generic type "Field" [type-arg]
|
||||
src/documents/serialisers.py:0: error: Missing type arguments for generic type "Iterable" [type-arg]
|
||||
src/documents/serialisers.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/serialisers.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/serialisers.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/serialisers.py:0: error: Need type annotation for "document" [var-annotated]
|
||||
src/documents/serialisers.py:0: error: Need type annotation for "documents" [var-annotated]
|
||||
src/documents/serialisers.py:0: error: Need type annotation for "permissions_dict" [var-annotated]
|
||||
src/documents/serialisers.py:0: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
|
||||
src/documents/serialisers.py:0: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
|
||||
src/documents/serialisers.py:0: error: No overload variant of "get" of "dict" matches argument types "str", "str" [call-overload]
|
||||
@@ -603,7 +630,6 @@ src/documents/signals/handlers.py:0: error: Item "ConsumableDocument" of "Docume
|
||||
src/documents/signals/handlers.py:0: error: Item "None" of "Any | None" has no attribute "get" [union-attr]
|
||||
src/documents/signals/handlers.py:0: error: Item "None" of "Any | None" has no attribute "get" [union-attr]
|
||||
src/documents/signals/handlers.py:0: error: Item "None" of "Any | None" has no attribute "remove" [union-attr]
|
||||
src/documents/signals/handlers.py:0: error: Item "None" of "BaseChannelLayer | None" has no attribute "group_send" [union-attr]
|
||||
src/documents/signals/handlers.py:0: error: Item "None" of "Path | Any | None" has no attribute "is_file" [union-attr]
|
||||
src/documents/signals/handlers.py:0: error: Item "None" of "Path | Any | None" has no attribute "is_file" [union-attr]
|
||||
src/documents/signals/handlers.py:0: error: Item "None" of "Path | Any | None" has no attribute "is_file" [union-attr]
|
||||
@@ -648,11 +674,11 @@ src/documents/templating/filepath.py:0: error: Function is missing a type annota
|
||||
src/documents/templating/filepath.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/templating/filepath.py:0: error: Incompatible types in assignment (expression has type "QuerySet[Tag, Tag]", variable has type "list[Tag]") [assignment]
|
||||
src/documents/templating/filepath.py:0: error: Need type annotation for "field_data" [var-annotated]
|
||||
src/documents/templating/filters.py:0: error: Incompatible types in assignment (expression has type "date | None", variable has type "str | datetime") [assignment]
|
||||
src/documents/templating/filters.py:0: error: Incompatible types in assignment (expression has type "datetime | None", variable has type "date | datetime | str") [assignment]
|
||||
src/documents/templating/filters.py:0: error: Item "str" of "str | datetime" has no attribute "strftime" [union-attr]
|
||||
src/documents/templating/utils.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/templating/workflows.py:0: error: Argument 1 to "update" of "MutableMapping" has incompatible type "dict[str, dict[str, dict[str, str]]]"; expected "SupportsKeysAndGetItem[str, str]" [arg-type]
|
||||
src/documents/templating/workflows.py:0: error: Incompatible return value type (got "None", expected "str") [return-value]
|
||||
src/documents/tests/export/test_sinks.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/tests/management/test_management_base_cmd.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/management/test_management_base_cmd.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/management/test_management_base_cmd.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
@@ -691,7 +717,6 @@ src/documents/tests/search/test_acceptance.py:0: error: Function is missing a ty
|
||||
src/documents/tests/search/test_acceptance.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/search/test_backend.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/search/test_backend.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/search/test_backend.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/search/test_backend.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/search/test_backend.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/search/test_cjk_clause.py:0: error: Argument 1 to "_build_cjk_query" has incompatible type "None"; expected "Index" [arg-type]
|
||||
@@ -766,8 +791,6 @@ src/documents/tests/test_api_bulk_download.py:0: error: Argument 1 to "read_stre
|
||||
src/documents/tests/test_api_bulk_download.py:0: error: Value of type variable "_StrPathT" of "copy" cannot be "Path | None" [type-var]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: "type[MatchingModel]" has no attribute "objects" [attr-defined]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: "type[MatchingModel]" has no attribute "objects" [attr-defined]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -823,12 +846,6 @@ src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type a
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/tests/test_api_bulk_edit.py:0: error: Skipping analyzing "auditlog.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/tests/test_api_chat.py:0: error: "_MonkeyPatchedResponse" has no attribute "streaming_content" [attr-defined]
|
||||
src/documents/tests/test_api_custom_fields.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -837,13 +854,6 @@ src/documents/tests/test_api_document_versions.py:0: error: Argument 1 to "read_
|
||||
src/documents/tests/test_api_document_versions.py:0: error: Argument 1 to "read_streaming_response" has incompatible type "_MonkeyPatchedResponse"; expected "StreamingHttpResponse" [arg-type]
|
||||
src/documents/tests/test_api_document_versions.py:0: error: Argument 1 to "read_streaming_response" has incompatible type "_MonkeyPatchedResponse"; expected "StreamingHttpResponse" [arg-type]
|
||||
src/documents/tests/test_api_document_versions.py:0: error: Argument 1 to "read_streaming_response" has incompatible type "_MonkeyPatchedResponse"; expected "StreamingHttpResponse" [arg-type]
|
||||
src/documents/tests/test_api_document_versions.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_document_versions.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_document_versions.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_document_versions.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_document_versions.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_document_versions.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_document_versions.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_documents.py:0: error: "None" object is not iterable [misc]
|
||||
src/documents/tests/test_api_documents.py:0: error: "object" has no attribute "get" [attr-defined]
|
||||
src/documents/tests/test_api_documents.py:0: error: Argument 1 to "Path" has incompatible type "Path | None"; expected "str | PathLike[str]" [arg-type]
|
||||
@@ -879,7 +889,6 @@ src/documents/tests/test_api_email.py:0: error: Function is missing a type annot
|
||||
src/documents/tests/test_api_email.py:0: error: Item "None" of "Path | None" has no attribute "stat" [union-attr]
|
||||
src/documents/tests/test_api_email.py:0: error: Value of type variable "_StrPathT" of "copy" cannot be "Path | None" [type-var]
|
||||
src/documents/tests/test_api_filter_by_custom_fields.py:0: error: Argument 1 to "quote" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
src/documents/tests/test_api_filter_by_custom_fields.py:0: error: Cannot infer type of lambda [misc]
|
||||
src/documents/tests/test_api_filter_by_custom_fields.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_filter_by_custom_fields.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_filter_by_custom_fields.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -892,13 +901,6 @@ src/documents/tests/test_api_objects.py:0: error: Function is missing a type ann
|
||||
src/documents/tests/test_api_objects.py:0: error: Item "Group" of "Group | dict[Any, Any]" has no attribute "count" [union-attr]
|
||||
src/documents/tests/test_api_objects.py:0: error: Item "dict[Any, Any]" of "Group | dict[Any, Any]" has no attribute "count" [union-attr]
|
||||
src/documents/tests/test_api_objects.py:0: error: Too few arguments for "count" of "list" [call-arg]
|
||||
src/documents/tests/test_api_ocr_templates.py:0: error: "Response" has no attribute "json" [attr-defined]
|
||||
src/documents/tests/test_api_ocr_templates.py:0: error: "Response" has no attribute "json" [attr-defined]
|
||||
src/documents/tests/test_api_ocr_templates.py:0: error: "Response" has no attribute "json" [attr-defined]
|
||||
src/documents/tests/test_api_ocr_templates.py:0: error: Argument 1 to "save" of "Image" has incompatible type "Path | None"; expected "str | bytes | PathLike[str] | PathLike[bytes] | IO[bytes]" [arg-type]
|
||||
src/documents/tests/test_api_ocr_templates.py:0: error: Incompatible types in assignment (expression has type "Response", variable has type "_MonkeyPatchedResponse") [assignment]
|
||||
src/documents/tests/test_api_ocr_templates.py:0: error: Incompatible types in assignment (expression has type "Response", variable has type "_MonkeyPatchedResponse") [assignment]
|
||||
src/documents/tests/test_api_ocr_templates.py:0: error: Item "None" of "OcrTemplateZone | None" has no attribute "name" [union-attr]
|
||||
src/documents/tests/test_api_permissions.py:0: error: Argument 2 to "get_perms" has incompatible type "Tag | None"; expected "Model" [arg-type]
|
||||
src/documents/tests/test_api_permissions.py:0: error: Argument 2 to "get_perms" has incompatible type "Tag | None"; expected "Model" [arg-type]
|
||||
src/documents/tests/test_api_permissions.py:0: error: Argument 2 to "has_perm" of "ObjectPermissionChecker" has incompatible type "Tag | None"; expected "Model" [arg-type]
|
||||
@@ -926,9 +928,6 @@ src/documents/tests/test_api_profile.py:0: error: Function is missing a type ann
|
||||
src/documents/tests/test_api_profile.py:0: error: Item "None" of "Token | None" has no attribute "key" [union-attr]
|
||||
src/documents/tests/test_api_profile.py:0: error: Skipping analyzing "allauth.mfa.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/tests/test_api_profile.py:0: error: Skipping analyzing "allauth.socialaccount.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/tests/test_api_release_notes.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_api_release_notes.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/tests/test_api_release_notes.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/tests/test_api_schema.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_schema.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_schema.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -956,7 +955,6 @@ src/documents/tests/test_api_schema.py:0: error: Value of type "SchemaGenerator"
|
||||
src/documents/tests/test_api_schema.py:0: error: Value of type "SchemaGenerator" is not indexable [index]
|
||||
src/documents/tests/test_api_schema.py:0: error: Value of type "SchemaGenerator" is not indexable [index]
|
||||
src/documents/tests/test_api_schema.py:0: error: Value of type "SchemaGenerator" is not indexable [index]
|
||||
src/documents/tests/test_api_schema.py:0: error: Value of type "SchemaGenerator" is not indexable [index]
|
||||
src/documents/tests/test_api_search.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_search.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_api_search.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -991,14 +989,7 @@ src/documents/tests/test_barcodes.py:0: error: "GetReaderPluginMixin" has no att
|
||||
src/documents/tests/test_barcodes.py:0: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TestAsnBarcode, Path], BarcodePlugin]"; expected "Callable[[TestAsnBarcode, Path], Iterator[Never]]" [arg-type]
|
||||
src/documents/tests/test_barcodes.py:0: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TestTagBarcode, Path], BarcodePlugin]"; expected "Callable[[TestTagBarcode, Path], Iterator[Never]]" [arg-type]
|
||||
src/documents/tests/test_barcodes.py:0: error: Argument 1 to "get_reader" of "GetReaderPluginMixin" has incompatible type "str"; expected "Path" [arg-type]
|
||||
src/documents/tests/test_barcodes.py:0: error: Argument 1 to "list" has incompatible type "QuerySet[DocumentBarcode, TypedDict({'page': int, 'value': str, 'format': str})]"; expected "Iterable[dict[Any, Any]]" [arg-type]
|
||||
src/documents/tests/test_barcodes.py:0: error: Incompatible types in assignment (expression has type "Path", variable has type "str") [assignment]
|
||||
src/documents/tests/test_barcodes.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/tests/test_barcodes.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/tests/test_barcodes.py:0: error: Missing type arguments for generic type "list" [type-arg]
|
||||
src/documents/tests/test_barcodes.py:0: error: Need type annotation for "reader" [var-annotated]
|
||||
src/documents/tests/test_barcodes.py:0: error: Need type annotation for "reader" [var-annotated]
|
||||
src/documents/tests/test_barcodes.py:0: error: Need type annotation for "reader" [var-annotated]
|
||||
src/documents/tests/test_barcodes.py:0: error: Need type annotation for "reader" [var-annotated]
|
||||
src/documents/tests/test_barcodes.py:0: error: Need type annotation for "reader" [var-annotated]
|
||||
src/documents/tests/test_barcodes.py:0: error: Need type annotation for "reader" [var-annotated]
|
||||
@@ -1024,8 +1015,7 @@ src/documents/tests/test_bulk_edit.py:0: error: Argument 2 to "set_document_type
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Argument 2 to "set_storage_path" has incompatible type "None"; expected "StoragePath" [arg-type]
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Argument 2 to "set_storage_path" has incompatible type "int"; expected "StoragePath" [arg-type]
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Argument 2 to "set_storage_path" has incompatible type "int"; expected "StoragePath" [arg-type]
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Dict entry 0 has incompatible type "Literal['not_a_real_action']": "PermissionGranteesUpdate"; expected "Literal['view', 'change']": "PermissionGranteesUpdate" [dict-item]
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Dict entry 1 has incompatible type "Literal['not_a_real_action']": "PermissionGranteesUpdate"; expected "Literal['view', 'change']": "PermissionGranteesUpdate" [dict-item]
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -1071,34 +1061,6 @@ src/documents/tests/test_bulk_edit.py:0: error: Item "dict[Any, Any]" of "Group
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Too few arguments for "count" of "list" [call-arg]
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Too few arguments for "count" of "list" [call-arg]
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Too few arguments for "count" of "list" [call-arg]
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Unused "type: ignore" comment [unused-ignore]
|
||||
src/documents/tests/test_bulk_edit.py:0: error: Unused "type: ignore" comment [unused-ignore]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Item "None" of "BaseChannelLayer | None" has no attribute "group_send" [union-attr]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Skipping analyzing "auditlog.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: TypedDict "_WebsocketTestScope" has no key "user" [typeddict-unknown-key]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: TypedDict "_WebsocketTestScope" has no key "user" [typeddict-unknown-key]
|
||||
src/documents/tests/test_bulk_operations.py:0: error: Value of type "Any | None" is not indexable [index]
|
||||
src/documents/tests/test_classifier.py:0: error: "None" has no attribute "classes_" [attr-defined]
|
||||
src/documents/tests/test_classifier.py:0: error: "None" has no attribute "classes_" [attr-defined]
|
||||
src/documents/tests/test_classifier.py:0: error: "None" has no attribute "classes_" [attr-defined]
|
||||
@@ -1196,7 +1158,6 @@ src/documents/tests/test_consumer_archive.py:0: error: Function is missing a typ
|
||||
src/documents/tests/test_consumer_archive.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_consumer_archive.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_consumer_archive.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_consumer_zone_ocr.py:0: error: Module "pytest_django.fixtures" has no attribute "SettingsWrapper" [attr-defined]
|
||||
src/documents/tests/test_document_list_effective_content_annotation.py:0: error: Incompatible types in assignment (expression has type "SimpleNamespace", variable has type "Request") [assignment]
|
||||
src/documents/tests/test_document_list_effective_content_annotation.py:0: error: Incompatible types in assignment (expression has type "SimpleNamespace", variable has type "Request") [assignment]
|
||||
src/documents/tests/test_double_sided.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
@@ -1289,8 +1250,6 @@ src/documents/tests/test_matchables.py:0: error: Missing type arguments for gene
|
||||
src/documents/tests/test_matchables.py:0: error: Missing type arguments for generic type "DjangoModelFactory" [type-arg]
|
||||
src/documents/tests/test_matchables.py:0: error: Missing type arguments for generic type "DjangoModelFactory" [type-arg]
|
||||
src/documents/tests/test_matchables.py:0: error: Missing type arguments for generic type "DjangoModelFactory" [type-arg]
|
||||
src/documents/tests/test_merge_documents_as_versions.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_merge_documents_as_versions.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_merge_documents_as_versions.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_merge_documents_as_versions.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_merge_documents_as_versions.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -1315,14 +1274,11 @@ src/documents/tests/test_models.py:0: error: Item "None" of "Document | None" ha
|
||||
src/documents/tests/test_parsers.py:0: error: "None" not callable [misc]
|
||||
src/documents/tests/test_parsers.py:0: error: "None" not callable [misc]
|
||||
src/documents/tests/test_parsers.py:0: error: "None" not callable [misc]
|
||||
src/documents/tests/test_parsers.py:0: error: "None" object is not iterable [misc]
|
||||
src/documents/tests/test_parsers.py:0: error: "float" object is not iterable [misc]
|
||||
src/documents/tests/test_permission_filtering_security.py:0: error: Argument "classifier" to "match_correspondents" has incompatible type "None"; expected "DocumentClassifier" [arg-type]
|
||||
src/documents/tests/test_permission_filtering_security.py:0: error: Argument "classifier" to "match_document_types" has incompatible type "None"; expected "DocumentClassifier" [arg-type]
|
||||
src/documents/tests/test_permission_filtering_security.py:0: error: Argument "classifier" to "match_storage_paths" has incompatible type "None"; expected "DocumentClassifier" [arg-type]
|
||||
src/documents/tests/test_permission_filtering_security.py:0: error: Argument "classifier" to "match_tags" has incompatible type "None"; expected "DocumentClassifier" [arg-type]
|
||||
src/documents/tests/test_permission_filtering_security.py:0: error: Argument 1 to "permitted_document_ids" has incompatible type "AnonymousUser"; expected "User | None" [arg-type]
|
||||
src/documents/tests/test_permission_filtering_security.py:0: error: Argument 1 to "permitted_document_ids" has incompatible type "AnonymousUser"; expected "User | None" [arg-type]
|
||||
src/documents/tests/test_permission_filtering_security.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/test_permission_filtering_security.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/test_permission_filtering_security.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
@@ -1376,12 +1332,10 @@ src/documents/tests/test_share_link_bundles.py:0: error: "_MonkeyPatchedResponse
|
||||
src/documents/tests/test_share_link_bundles.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_share_link_bundles.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_share_link_bundles.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_tag_adjacency.py:0: error: "Model" has no attribute "name" [attr-defined]
|
||||
src/documents/tests/test_tag_adjacency.py:0: error: "Model" has no attribute "tn_parent_id" [attr-defined]
|
||||
src/documents/tests/test_share_link_bundles.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_tag_hierarchy.py:0: error: Argument 1 to "run_workflows" has incompatible type "int"; expected "WorkflowTriggerType" [arg-type]
|
||||
src/documents/tests/test_tag_hierarchy.py:0: error: Argument 1 to "run_workflows" has incompatible type "int"; expected "WorkflowTriggerType" [arg-type]
|
||||
src/documents/tests/test_tag_hierarchy.py:0: error: Argument 2 to "get" of "APIClient" has incompatible type "dict[str, object]"; expected "Mapping[str, str | bytes | float | Iterable[str | bytes | float]] | Iterable[tuple[str, str | bytes | float | Iterable[str | bytes | float]]] | None" [arg-type]
|
||||
src/documents/tests/test_tag_hierarchy.py:0: error: Incompatible types in assignment (expression has type "Literal[204, 200]", variable has type "Literal[403]") [assignment]
|
||||
src/documents/tests/test_tag_hierarchy.py:0: error: Need type annotation for "context" (hint: "context: dict[<type>, <type>] = ...") [var-annotated]
|
||||
src/documents/tests/test_task_signals.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/tests/test_task_signals.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
@@ -1391,7 +1345,6 @@ src/documents/tests/test_task_signals.py:0: error: Function is missing a type an
|
||||
src/documents/tests/test_task_signals.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_task_signals.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_task_signals.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_task_signals.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_task_signals.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/tests/test_task_signals.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/tests/test_task_signals.py:0: error: Missing type arguments for generic type "tuple" [type-arg]
|
||||
@@ -1407,8 +1360,6 @@ src/documents/tests/test_tasks.py:0: error: Function is missing a type annotatio
|
||||
src/documents/tests/test_tasks.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_tasks.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_tasks.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_utils.py:0: error: "ImageFile" has no attribute "n_frames"; maybe "_min_frame"? [attr-defined]
|
||||
src/documents/tests/test_utils.py:0: error: "ImageFile" has no attribute "n_frames"; maybe "_min_frame"? [attr-defined]
|
||||
src/documents/tests/test_views.py:0: error: "_MonkeyPatchedWSGIResponse" has no attribute "render" [attr-defined]
|
||||
src/documents/tests/test_views.py:0: error: "_MonkeyPatchedWSGIResponse" has no attribute "render" [attr-defined]
|
||||
src/documents/tests/test_views.py:0: error: "_MonkeyPatchedWSGIResponse" has no attribute "url" [attr-defined]
|
||||
@@ -1490,10 +1441,6 @@ src/documents/tests/test_workflows.py:0: error: Argument 2 to "assertIn" of "Tes
|
||||
src/documents/tests/test_workflows.py:0: error: Argument 2 to "assertIn" of "TestCase" has incompatible type "str | None"; expected "Iterable[Any] | Container[Any]" [arg-type]
|
||||
src/documents/tests/test_workflows.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_workflows.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_workflows.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_workflows.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/tests/test_workflows.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_workflows.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_workflows.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_workflows.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/tests/test_workflows.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -1548,8 +1495,6 @@ src/documents/tests/test_workflows.py:0: error: Item "None" of "Request | None"
|
||||
src/documents/tests/test_workflows.py:0: error: Item "None" of "Request | None" has no attribute "headers" [union-attr]
|
||||
src/documents/tests/test_workflows.py:0: error: Item "None" of "Request | None" has no attribute "headers" [union-attr]
|
||||
src/documents/tests/test_workflows.py:0: error: Item "None" of "Request | None" has no attribute "url" [union-attr]
|
||||
src/documents/tests/test_workflows.py:0: error: Item "None" of "WorkflowActionWebhook | None" has no attribute "params" [union-attr]
|
||||
src/documents/tests/test_workflows.py:0: error: Item "None" of "WorkflowActionWebhook | None" has no attribute "use_params" [union-attr]
|
||||
src/documents/tests/test_workflows.py:0: error: Item "str" of "Path | str" has no attribute "name" [union-attr]
|
||||
src/documents/tests/test_workflows.py:0: error: Name "group_perms" already defined on line 0 [no-redef]
|
||||
src/documents/tests/test_workflows.py:0: error: Name "group_perms" already defined on line 0 [no-redef]
|
||||
@@ -1566,15 +1511,6 @@ src/documents/tests/test_workflows.py:0: error: Too few arguments for "count" of
|
||||
src/documents/tests/test_workflows.py:0: error: Too few arguments for "count" of "list" [call-arg]
|
||||
src/documents/tests/test_workflows.py:0: error: Too few arguments for "count" of "list" [call-arg]
|
||||
src/documents/tests/test_workflows.py:0: error: Too few arguments for "count" of "list" [call-arg]
|
||||
src/documents/tests/test_zone_ocr.py:0: error: Item "None" of "Image | None" has no attribute "__enter__" [union-attr]
|
||||
src/documents/tests/test_zone_ocr.py:0: error: Item "None" of "Image | None" has no attribute "__enter__" [union-attr]
|
||||
src/documents/tests/test_zone_ocr.py:0: error: Item "None" of "Image | None" has no attribute "__enter__" [union-attr]
|
||||
src/documents/tests/test_zone_ocr.py:0: error: Item "None" of "Image | None" has no attribute "__enter__" [union-attr]
|
||||
src/documents/tests/test_zone_ocr.py:0: error: Item "None" of "Image | None" has no attribute "__exit__" [union-attr]
|
||||
src/documents/tests/test_zone_ocr.py:0: error: Item "None" of "Image | None" has no attribute "__exit__" [union-attr]
|
||||
src/documents/tests/test_zone_ocr.py:0: error: Item "None" of "Image | None" has no attribute "__exit__" [union-attr]
|
||||
src/documents/tests/test_zone_ocr.py:0: error: Item "None" of "Image | None" has no attribute "__exit__" [union-attr]
|
||||
src/documents/tests/test_zone_ocr.py:0: error: Module "pytest_django.fixtures" has no attribute "SettingsWrapper" [attr-defined]
|
||||
src/documents/tests/utils.py:0: error: "GetConsumerMixin" has no attribute "dirs" [attr-defined]
|
||||
src/documents/tests/utils.py:0: error: "GetConsumerMixin" has no attribute "dirs" [attr-defined]
|
||||
src/documents/tests/utils.py:0: error: "GetConsumerMixin" has no attribute "dirs" [attr-defined]
|
||||
@@ -1588,28 +1524,27 @@ src/documents/utils.py:0: error: Incompatible types in assignment (expression ha
|
||||
src/documents/utils.py:0: error: Missing type arguments for generic type "CompletedProcess" [type-arg]
|
||||
src/documents/validators.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/versioning.py:0: error: Missing type arguments for generic type "Prefetch" [type-arg]
|
||||
src/documents/versioning.py:0: error: Type argument "int" of "QuerySet" must be a subtype of "Model" [type-var]
|
||||
src/documents/views.py:0: error: "BulkPermissionMixin" has no attribute "filter_queryset" [attr-defined]
|
||||
src/documents/views.py:0: error: "BulkPermissionMixin" has no attribute "get_queryset" [attr-defined]
|
||||
src/documents/views.py:0: error: "BulkPermissionMixin" has no attribute "queryset" [attr-defined]
|
||||
src/documents/views.py:0: error: "BulkPermissionMixin" has no attribute "queryset" [attr-defined]
|
||||
src/documents/views.py:0: error: "Sequence[_SupportsHasPermission]" has no attribute "append" [attr-defined]
|
||||
src/documents/views.py:0: error: "get_serializer_context" undefined in superclass [misc]
|
||||
src/documents/views.py:0: error: "object" has no attribute "apply_async" [attr-defined]
|
||||
src/documents/views.py:0: error: "type[DocumentFilterSet]" has no attribute "base_filters" [attr-defined]
|
||||
src/documents/views.py:0: error: "type[DocumentFilterSet]" has no attribute "declared_filters" [attr-defined]
|
||||
src/documents/views.py:0: error: "type[Model]" has no attribute "objects" [attr-defined]
|
||||
src/documents/views.py:0: error: Argument "filename" to "FileResponse" has incompatible type "str | Any | None"; expected "str" [arg-type]
|
||||
src/documents/views.py:0: error: Argument "path" to "EmailAttachment" has incompatible type "Path | None"; expected "Path" [arg-type]
|
||||
src/documents/views.py:0: error: Argument "user" to "_has_document_permissions" of "DocumentOperationPermissionMixin" has incompatible type "User | AnonymousUser"; expected "User" [arg-type]
|
||||
src/documents/views.py:0: error: Argument "user" to "_has_document_permissions" of "DocumentOperationPermissionMixin" has incompatible type "User | AnonymousUser"; expected "User" [arg-type]
|
||||
src/documents/views.py:0: error: Argument "user" to "_resolve_document_ids" of "DocumentSelectionMixin" has incompatible type "User | AnonymousUser"; expected "User" [arg-type]
|
||||
src/documents/views.py:0: error: Argument "user" to "_resolve_document_ids" of "DocumentSelectionMixin" has incompatible type "User | AnonymousUser"; expected "User" [arg-type]
|
||||
src/documents/views.py:0: error: Argument "user" to "has_document_operation_permissions" has incompatible type "User | AnonymousUser"; expected "User" [arg-type]
|
||||
src/documents/views.py:0: error: Argument "user" to "has_document_operation_permissions" has incompatible type "User | AnonymousUser"; expected "User" [arg-type]
|
||||
src/documents/views.py:0: error: Argument 1 to "TaskSummarySerializer" has incompatible type "QuerySet[PaperlessTask@AnnotatedWith[TypedDict({'total_count': int, 'pending_count': int, 'success_count': int, 'failure_count': int, 'avg_duration_seconds': Any, 'avg_wait_time_seconds': Any, 'last_run': Any, 'last_success': Any, 'last_failure': Any})], TypedDict({'task_type': str, 'total_count': Any, 'pending_count': Any, 'success_count': Any, 'failure_count': Any, 'avg_duration_seconds': Any, 'avg_wait_time_seconds': Any, 'last_run': Any, 'last_success': Any, 'last_failure': Any})]"; expected "dict[str, Any] | None" [arg-type]
|
||||
src/documents/views.py:0: error: Argument 1 to "int" has incompatible type "Any | Collection[str]"; expected "str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc" [arg-type]
|
||||
src/documents/views.py:0: error: Argument 1 to "int" has incompatible type "Any | Collection[str]"; expected "str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc" [arg-type]
|
||||
src/documents/views.py:0: error: Argument 1 to "int" has incompatible type "Any | Collection[str]"; expected "str | Buffer | SupportsInt | SupportsIndex" [arg-type]
|
||||
src/documents/views.py:0: error: Argument 1 to "int" has incompatible type "Any | Collection[str]"; expected "str | Buffer | SupportsInt | SupportsIndex" [arg-type]
|
||||
src/documents/views.py:0: error: Argument 1 to "paginate_queryset" of "GenericAPIView" has incompatible type "TantivyRelevanceList"; expected "QuerySet[Any, _MT_co] | Sequence[_MT_co]" [arg-type]
|
||||
src/documents/views.py:0: error: Argument 1 to "permitted_document_ids" has incompatible type "User | AnonymousUser"; expected "User | None" [arg-type]
|
||||
src/documents/views.py:0: error: Argument 1 to "permitted_object_ids" has incompatible type "User | AnonymousUser"; expected "User | None" [arg-type]
|
||||
src/documents/views.py:0: error: Argument 1 to "permitted_object_ids" has incompatible type "User | AnonymousUser"; expected "User | None" [arg-type]
|
||||
src/documents/views.py:0: error: Argument 2 to "match_correspondents" has incompatible type "DocumentClassifier | None"; expected "DocumentClassifier" [arg-type]
|
||||
src/documents/views.py:0: error: Argument 2 to "match_document_types" has incompatible type "DocumentClassifier | None"; expected "DocumentClassifier" [arg-type]
|
||||
src/documents/views.py:0: error: Argument 2 to "match_storage_paths" has incompatible type "DocumentClassifier | None"; expected "DocumentClassifier" [arg-type]
|
||||
@@ -1635,10 +1570,6 @@ src/documents/views.py:0: error: Function is missing a return type annotation [
|
||||
src/documents/views.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/views.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/views.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/views.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/views.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/views.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/views.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/views.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/views.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/views.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
@@ -1712,6 +1643,7 @@ src/documents/views.py:0: error: Function is missing a type annotation for one o
|
||||
src/documents/views.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/views.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/views.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/views.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/views.py:0: error: Incompatible types in assignment (expression has type "Any | None", variable has type "dict[Any, Any]") [assignment]
|
||||
src/documents/views.py:0: error: Incompatible types in assignment (expression has type "ClassificationSuggestions", variable has type "dict[Any, Any]") [assignment]
|
||||
src/documents/views.py:0: error: Incompatible types in assignment (expression has type "QuerySet[Document, Document]", variable has type "list[Any]") [assignment]
|
||||
@@ -1738,8 +1670,9 @@ src/documents/views.py:0: error: Item "None" of "Any | None" has no attribute "g
|
||||
src/documents/views.py:0: error: Item "None" of "ApplicationConfiguration | None" has no attribute "app_logo" [union-attr]
|
||||
src/documents/views.py:0: error: Item "None" of "BasePagination | None" has no attribute "get_page_size" [union-attr]
|
||||
src/documents/views.py:0: error: Item "None" of "BasePagination | None" has no attribute "page_size" [union-attr]
|
||||
src/documents/views.py:0: error: Missing positional argument "request" in call to "email_documents" [call-arg]
|
||||
src/documents/views.py:0: error: Missing type arguments for generic type "GenericViewSet" [type-arg]
|
||||
src/documents/views.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/views.py:0: error: Missing type arguments for generic type "list" [type-arg]
|
||||
src/documents/views.py:0: error: Missing type arguments for generic type "list" [type-arg]
|
||||
src/documents/views.py:0: error: Missing type arguments for generic type "list" [type-arg]
|
||||
src/documents/views.py:0: error: Missing type arguments for generic type "list" [type-arg]
|
||||
@@ -1754,18 +1687,17 @@ src/documents/views.py:0: error: No overload variant of "prefetch_related" of "Q
|
||||
src/documents/views.py:0: error: Skipping analyzing "auditlog.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/views.py:0: error: Skipping analyzing "langdetect": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/documents/views.py:0: error: Unsupported operand types for + ("None" and "int") [operator]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[Correspondent]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[Any]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[Any]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[Any]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[Any]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[Any]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[Any]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[Any]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[CustomField]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[DocumentType]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[Group]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[MailAccount]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[MailRule]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[SavedView]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[StoragePath]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[Tag]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[User]" is not indexable [index]
|
||||
src/documents/views.py:0: error: Value of type "Iterable[Workflow]" is not indexable [index]
|
||||
src/documents/workflows/actions.py:0: error: Argument 1 to "get_value_field_name" of "CustomFieldInstance" has incompatible type "str"; expected "FieldDataType" [arg-type]
|
||||
src/documents/workflows/actions.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/workflows/actions.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/documents/workflows/actions.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -1785,8 +1717,6 @@ src/documents/workflows/actions.py:0: error: Item "ConsumableDocument" of "Docum
|
||||
src/documents/workflows/actions.py:0: error: Item "ConsumableDocument" of "Document | ConsumableDocument" has no attribute "pk" [union-attr]
|
||||
src/documents/workflows/actions.py:0: error: Item "ConsumableDocument" of "Document | ConsumableDocument" has no attribute "pk" [union-attr]
|
||||
src/documents/workflows/actions.py:0: error: Item "ConsumableDocument" of "Document | ConsumableDocument" has no attribute "title" [union-attr]
|
||||
src/documents/workflows/actions.py:0: error: Item "None" of "DocumentMetadataOverrides | None" has no attribute "custom_fields" [union-attr]
|
||||
src/documents/workflows/actions.py:0: error: Item "None" of "DocumentMetadataOverrides | None" has no attribute "custom_fields" [union-attr]
|
||||
src/documents/workflows/actions.py:0: error: Item "None" of "WorkflowActionEmail | None" has no attribute "body" [union-attr]
|
||||
src/documents/workflows/actions.py:0: error: Item "None" of "WorkflowActionEmail | None" has no attribute "body" [union-attr]
|
||||
src/documents/workflows/actions.py:0: error: Item "None" of "WorkflowActionEmail | None" has no attribute "include_document" [union-attr]
|
||||
@@ -1808,7 +1738,6 @@ src/documents/workflows/actions.py:0: error: Item "None" of "WorkflowActionWebho
|
||||
src/documents/workflows/actions.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/workflows/actions.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/workflows/actions.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/documents/workflows/actions.py:0: error: Value of type "dict[Any, Any] | Any | None" is not indexable [index]
|
||||
src/documents/workflows/ai.py:0: error: "type[ObjT]" has no attribute "objects" [attr-defined]
|
||||
src/documents/workflows/ai.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/workflows/mutations.py:0: error: "WorkflowAction" has no attribute "has_assign_change_groups"; maybe "assign_change_groups"? [attr-defined]
|
||||
@@ -1841,6 +1770,7 @@ src/documents/workflows/mutations.py:0: error: Function is missing a return type
|
||||
src/documents/workflows/mutations.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/documents/workflows/mutations.py:0: error: Item "None" of "Any | None" has no attribute "get" [union-attr]
|
||||
src/documents/workflows/mutations.py:0: error: Item "None" of "Any | None" has no attribute "get" [union-attr]
|
||||
src/documents/workflows/mutations.py:0: error: Need type annotation for "permissions" [var-annotated]
|
||||
src/documents/workflows/utils.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/documents/workflows/webhooks.py:0: error: Argument 1 to "post" of "Client" has incompatible type "**dict[str, str | dict[Any, Any] | None]"; expected "Cookies | CookieJar | dict[str, str] | list[tuple[str, str]] | None" [arg-type]
|
||||
src/documents/workflows/webhooks.py:0: error: Argument 1 to "post" of "Client" has incompatible type "**dict[str, str | dict[Any, Any] | None]"; expected "Headers | Mapping[str, str] | Mapping[bytes, bytes] | Sequence[tuple[str, str]] | Sequence[tuple[bytes, bytes]] | None" [arg-type]
|
||||
@@ -1863,12 +1793,10 @@ src/paperless/adapter.py:0: error: Function is missing a type annotation [no-un
|
||||
src/paperless/adapter.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/adapter.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/adapter.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/adapter.py:0: error: Missing type arguments for generic type "tuple" [type-arg]
|
||||
src/paperless/adapter.py:0: error: Name "user" already defined on line 0 [no-redef]
|
||||
src/paperless/adapter.py:0: error: Skipping analyzing "allauth.account.adapter": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/adapter.py:0: error: Skipping analyzing "allauth.core": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/adapter.py:0: error: Skipping analyzing "allauth.headless.tokens.strategies.sessions": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/adapter.py:0: error: Skipping analyzing "allauth.mfa.stages": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/adapter.py:0: error: Skipping analyzing "allauth.socialaccount.adapter": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/admin.py:0: error: "PaperlessUserForm" has no attribute "request" [attr-defined]
|
||||
src/paperless/admin.py:0: error: "type[ModelForm[Any]]" has no attribute "request" [attr-defined]
|
||||
@@ -1924,17 +1852,12 @@ src/paperless/consumers.py:0: error: Argument 1 to "_can_view" of "StatusConsume
|
||||
src/paperless/consumers.py:0: error: Item "AbstractBaseUser" of "AbstractBaseUser | AnonymousUser" has no attribute "groups" [union-attr]
|
||||
src/paperless/consumers.py:0: error: Item "AbstractBaseUser" of "AbstractBaseUser | AnonymousUser" has no attribute "id" [union-attr]
|
||||
src/paperless/consumers.py:0: error: Item "AbstractBaseUser" of "AbstractBaseUser | AnonymousUser" has no attribute "is_superuser" [union-attr]
|
||||
src/paperless/consumers.py:0: error: Item "None" of "UserLazyObject | None" has no attribute "id" [union-attr]
|
||||
src/paperless/consumers.py:0: error: Item "None" of "UserLazyObject | None" has no attribute "id" [union-attr]
|
||||
src/paperless/consumers.py:0: error: Missing type arguments for generic type "Task" [type-arg]
|
||||
src/paperless/consumers.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/paperless/consumers.py:0: error: Unsupported operand types for in ("Any | None" and "list[int]") [operator]
|
||||
src/paperless/db_cache.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/db_cache.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/db_cache.py:0: error: Skipping analyzing "cachalot.api": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/db_cache.py:0: error: Skipping analyzing "cachalot.utils": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/fields.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/fields.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless/middleware.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/middleware.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/middleware.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
@@ -1956,7 +1879,6 @@ src/paperless/parsers/tesseract.py:0: error: Missing type arguments for generic
|
||||
src/paperless/parsers/tesseract.py:0: error: Skipping analyzing "img2pdf": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/serialisers.py:0: error: "PasswordValidationMixin" has no attribute "instance" [attr-defined]
|
||||
src/paperless/serialisers.py:0: error: "UploadedFile[Any]" has no attribute "field_name" [attr-defined]
|
||||
src/paperless/serialisers.py:0: error: Argument 1 to "is_obfuscated_password" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
src/paperless/serialisers.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
@@ -1966,6 +1888,7 @@ src/paperless/serialisers.py:0: error: Function is missing a type annotation [n
|
||||
src/paperless/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/serialisers.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless/serialisers.py:0: error: Item "None" of "str | None" has no attribute "replace" [union-attr]
|
||||
src/paperless/serialisers.py:0: error: Missing type arguments for generic type "UploadedFile" [type-arg]
|
||||
src/paperless/serialisers.py:0: error: Missing type arguments for generic type "UploadedFile" [type-arg]
|
||||
src/paperless/serialisers.py:0: error: Need type annotation for "auth_token" [var-annotated]
|
||||
@@ -1976,6 +1899,7 @@ src/paperless/serialisers.py:0: error: Skipping analyzing "allauth.mfa.totp.inte
|
||||
src/paperless/serialisers.py:0: error: Skipping analyzing "allauth.socialaccount.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/settings/__init__.py:0: error: "Collection[str]" has no attribute "append" [attr-defined]
|
||||
src/paperless/settings/__init__.py:0: error: "Collection[str]" has no attribute "insert" [attr-defined]
|
||||
src/paperless/settings/__init__.py:0: error: Argument 1 to "append" of "list" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
src/paperless/settings/__init__.py:0: error: Argument 1 to "parse_ignore_dates" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
src/paperless/settings/__init__.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/settings/__init__.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
@@ -1983,7 +1907,6 @@ src/paperless/settings/__init__.py:0: error: Function is missing a return type a
|
||||
src/paperless/settings/__init__.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless/settings/__init__.py:0: error: Incompatible types in assignment (expression has type "bool", variable has type "str") [assignment]
|
||||
src/paperless/settings/__init__.py:0: error: Incompatible types in assignment (expression has type "dict[str, object]", target has type "str") [assignment]
|
||||
src/paperless/settings/__init__.py:0: error: Incompatible types in assignment (expression has type "int", target has type "Collection[str]") [assignment]
|
||||
src/paperless/settings/custom.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/paperless/settings/custom.py:0: error: No overload variant of "getenv" matches argument types "Collection[str]", "Collection[str]" [call-overload]
|
||||
src/paperless/settings/custom.py:0: error: Unpacked dict entry 0 has incompatible type "Collection[str]"; expected "SupportsKeysAndGetItem[str, dict[str, str]]" [dict-item]
|
||||
@@ -2003,6 +1926,8 @@ src/paperless/tests/parsers/test_mail_parser.py:0: error: Item "None" of "Reques
|
||||
src/paperless/tests/parsers/test_mail_parser.py:0: error: Item "None" of "Request | None" has no attribute "url" [union-attr]
|
||||
src/paperless/tests/parsers/test_mail_parser_live.py:0: error: Argument 1 to "extract_text" has incompatible type "Path | None"; expected "Path" [arg-type]
|
||||
src/paperless/tests/parsers/test_mail_parser_live.py:0: error: List item 0 has incompatible type "str | None"; expected "str | bytes | PathLike[str] | PathLike[bytes]" [list-item]
|
||||
src/paperless/tests/parsers/test_parse_modes.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/tests/parsers/test_parse_modes.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/tests/parsers/test_parse_modes.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/tests/parsers/test_parse_modes.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/tests/parsers/test_parse_modes.py:0: error: Incompatible types in assignment (expression has type "str", variable has type "ModeChoices") [assignment]
|
||||
@@ -2063,21 +1988,14 @@ src/paperless/tests/settings/test_environment_parsers.py:0: error: Function is m
|
||||
src/paperless/tests/settings/test_environment_parsers.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless/tests/settings/test_environment_parsers.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless/tests/settings/test_remote_user.py:0: error: Unsupported target for indexed assignment ("Collection[str]") [index]
|
||||
src/paperless/tests/test_adapter.py:0: error: "BaseDatabaseWrapper" has no attribute "is_in_memory_db" [attr-defined]
|
||||
src/paperless/tests/settings/test_settings.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/tests/settings/test_settings.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_adapter.py:0: error: Cannot assign to a method [method-assign]
|
||||
src/paperless/tests/test_adapter.py:0: error: Cannot assign to a method [method-assign]
|
||||
src/paperless/tests/test_adapter.py:0: error: Cannot assign to a method [method-assign]
|
||||
src/paperless/tests/test_adapter.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_adapter.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_adapter.py:0: error: Incompatible types in assignment (expression has type "dict[Never, Never]", variable has type "SessionBase") [assignment]
|
||||
src/paperless/tests/test_adapter.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/paperless/tests/test_adapter.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/paperless/tests/test_adapter.py:0: error: Skipping analyzing "allauth.account.adapter": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/tests/test_adapter.py:0: error: Skipping analyzing "allauth.account.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/tests/test_adapter.py:0: error: Skipping analyzing "allauth.core": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/tests/test_adapter.py:0: error: Skipping analyzing "allauth.mfa.totp.internal.auth": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/tests/test_adapter.py:0: error: Skipping analyzing "allauth.socialaccount.adapter": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/tests/test_adapter.py:0: error: Skipping analyzing "allauth.socialaccount.models": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless/tests/test_admin_auth.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_admin_auth.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_admin_auth.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
@@ -2088,10 +2006,6 @@ src/paperless/tests/test_api_auth.py:0: error: Function is missing a return type
|
||||
src/paperless/tests/test_api_auth.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_api_auth.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_api_auth.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_api_auth.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_api_auth.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_api_auth.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_api_auth.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_auth_middleware.py:0: error: Argument 1 to "AutoLoginMiddleware" has incompatible type "Callable[[Any], None]"; expected "_AnyGetResponseCallable" [arg-type]
|
||||
src/paperless/tests/test_auth_middleware.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_checks.py:0: error: Generator has incompatible item type "str | None"; expected "str" [misc]
|
||||
@@ -2101,7 +2015,6 @@ src/paperless/tests/test_checks.py:0: error: Unsupported right operand type for
|
||||
src/paperless/tests/test_checks.py:0: error: Unsupported right operand type for in ("str | None") [operator]
|
||||
src/paperless/tests/test_checks.py:0: error: Unsupported right operand type for in ("str | None") [operator]
|
||||
src/paperless/tests/test_checks.py:0: error: Unsupported right operand type for in ("str | None") [operator]
|
||||
src/paperless/tests/test_checks.py:0: error: Unsupported right operand type for in ("str | None") [operator]
|
||||
src/paperless/tests/test_compression_middleware.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_logging.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/tests/test_logging.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
@@ -2181,7 +2094,7 @@ src/paperless/validators.py:0: error: Argument 1 to "join" of "str" has incompat
|
||||
src/paperless/validators.py:0: error: Incompatible types in assignment (expression has type "str | bytes", variable has type "str") [assignment]
|
||||
src/paperless/validators.py:0: error: Missing type arguments for generic type "UploadedFile" [type-arg]
|
||||
src/paperless/validators.py:0: error: Missing type arguments for generic type "UploadedFile" [type-arg]
|
||||
src/paperless/views.py:0: error: Argument 1 to "int" has incompatible type "Any | Collection[str]"; expected "str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc" [arg-type]
|
||||
src/paperless/views.py:0: error: Argument 1 to "int" has incompatible type "Any | Collection[str]"; expected "str | Buffer | SupportsInt | SupportsIndex" [arg-type]
|
||||
src/paperless/views.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/views.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless/views.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
@@ -2231,20 +2144,16 @@ src/paperless_ai/ai_classifier.py:0: error: Argument 1 to "parse_ai_response" ha
|
||||
src/paperless_ai/ai_classifier.py:0: error: Incompatible types in assignment (expression has type "Any | None", variable has type "str") [assignment]
|
||||
src/paperless_ai/ai_classifier.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/paperless_ai/ai_classifier.py:0: error: Missing type arguments for generic type "dict" [type-arg]
|
||||
src/paperless_ai/ai_classifier.py:0: error: TypedDict key must be a string literal; expected one of ("title", "tags", "correspondents", "document_types", "storage_paths", ...) [literal-required]
|
||||
src/paperless_ai/ai_classifier.py:0: error: TypedDict key must be a string literal; expected one of ("title", "tags", "correspondents", "document_types", "storage_paths", ...) [literal-required]
|
||||
src/paperless_ai/ai_classifier.py:0: error: TypedDict key must be a string literal; expected one of ("title", "tags", "correspondents", "document_types", "storage_paths", ...) [literal-required]
|
||||
src/paperless_ai/ai_classifier.py:0: error: TypedDict key must be a string literal; expected one of ("correspondents", "dates", "document_types", "storage_paths", "tags", ...) [literal-required]
|
||||
src/paperless_ai/ai_classifier.py:0: error: TypedDict key must be a string literal; expected one of ("correspondents", "dates", "document_types", "storage_paths", "tags", ...) [literal-required]
|
||||
src/paperless_ai/ai_classifier.py:0: error: TypedDict key must be a string literal; expected one of ("correspondents", "dates", "document_types", "storage_paths", "tags", ...) [literal-required]
|
||||
src/paperless_ai/base_model.py:0: error: Invalid index type "str | None" for "dict[str, FieldInfo]"; expected type "str" [index]
|
||||
src/paperless_ai/chat.py:0: error: Dict entry 1 has incompatible type "str": "str | Any | None"; expected "str": "int | str" [dict-item]
|
||||
src/paperless_ai/chat.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_ai/chat.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless_ai/chat.py:0: error: Incompatible return value type (got "tuple[str | None, Any | AsyncGenerator[str, None], Any | Generator[str, None, None] | AsyncGenerator[str, None]]", expected "tuple[str | None, AsyncIterator[str], AsyncIterator[str]]") [return-value]
|
||||
src/paperless_ai/chat.py:0: error: Item "Response" of "Response | StreamingResponse | AsyncStreamingResponse | PydanticResponse" has no attribute "async_response_gen" [union-attr]
|
||||
src/paperless_ai/chat.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_ai/chat.py:0: error: Item "AsyncGenerator[str, None]" of "Any | Generator[str, None, None] | AsyncGenerator[str, None]" has no attribute "__iter__" (not iterable) [union-attr]
|
||||
src/paperless_ai/chat.py:0: error: Item "Response" of "Response | StreamingResponse | AsyncStreamingResponse | PydanticResponse" has no attribute "response_gen" [union-attr]
|
||||
src/paperless_ai/chat.py:0: error: Item "StreamingResponse" of "Response | StreamingResponse | AsyncStreamingResponse | PydanticResponse" has no attribute "async_response_gen" [union-attr]
|
||||
src/paperless_ai/chat.py:0: error: Missing type arguments for generic type "list" [type-arg]
|
||||
src/paperless_ai/chat.py:0: error: Value of type variable "_SupportsAcloseT" of "aclosing" cannot be "AsyncIterator[str]" [type-var]
|
||||
src/paperless_ai/chat.py:0: error: Value of type variable "_SupportsAcloseT" of "aclosing" cannot be "AsyncIterator[str]" [type-var]
|
||||
src/paperless_ai/client.py:0: error: Incompatible types in assignment (expression has type "str | None", variable has type "str") [assignment]
|
||||
src/paperless_ai/client.py:0: error: Skipping analyzing "llama_index.llms.ollama": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless_ai/client.py:0: error: Skipping analyzing "llama_index.llms.openai_like": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
@@ -2267,7 +2176,6 @@ src/paperless_ai/indexing.py:0: error: Function is missing a type annotation [n
|
||||
src/paperless_ai/indexing.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless_ai/indexing.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless_ai/indexing.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless_ai/indexing.py:0: error: Incompatible types in assignment (expression has type "Document | None", variable has type "Document") [assignment]
|
||||
src/paperless_ai/matching.py:0: error: "type[ModelT]" has no attribute "objects" [attr-defined]
|
||||
src/paperless_ai/matching.py:0: error: "type[ModelT]" has no attribute "objects" [attr-defined]
|
||||
src/paperless_ai/matching.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
@@ -2297,8 +2205,6 @@ src/paperless_ai/tests/test_ai_classifier.py:0: error: Function is missing a typ
|
||||
src/paperless_ai/tests/test_ai_classifier.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_ai_classifier.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_ai_classifier.py:0: error: Need type annotation for "empty_candidates" [var-annotated]
|
||||
src/paperless_ai/tests/test_ai_indexing.py:0: error: "def get_embedding_model(config: AIConfig, *, refresh: bool = ...) -> BaseEmbedding" has no attribute "assert_called_once_with" [attr-defined]
|
||||
src/paperless_ai/tests/test_ai_indexing.py:0: error: "def get_embedding_model(config: AIConfig, *, refresh: bool = ...) -> BaseEmbedding" has no attribute "call_args" [attr-defined]
|
||||
src/paperless_ai/tests/test_base_model.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_base_model.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_base_model.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
@@ -2314,7 +2220,6 @@ src/paperless_ai/tests/test_base_model.py:0: error: Function is missing a return
|
||||
src/paperless_ai/tests/test_base_model.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_base_model.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_base_model.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_chat.py:0: error: "append" of "list" does not return a value (it only ever returns None) [func-returns-value]
|
||||
src/paperless_ai/tests/test_chat.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_chat.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_chat.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
@@ -2327,9 +2232,6 @@ src/paperless_ai/tests/test_chat.py:0: error: Function is missing a type annotat
|
||||
src/paperless_ai/tests/test_chat.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless_ai/tests/test_chat.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless_ai/tests/test_chat.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless_ai/tests/test_chat_cancellation.py:0: error: "AsyncIterator[str]" has no attribute "aclose" [attr-defined]
|
||||
src/paperless_ai/tests/test_chat_cancellation.py:0: error: Argument 4 to "_PreparedChat" has incompatible type "list[dict[str, object]]"; expected "list[dict[str, int | str]]" [arg-type]
|
||||
src/paperless_ai/tests/test_chat_chunk_merging.py:0: error: Return type "Iterator[CompletionResponse]" of "stream_complete" incompatible with return type "Generator[CompletionResponse, None, None]" in supertype "llama_index.core.base.llms.base.BaseLLM" [override]
|
||||
src/paperless_ai/tests/test_client.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_client.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_client.py:0: error: Function is missing a return type annotation [no-untyped-def]
|
||||
@@ -2363,8 +2265,6 @@ src/paperless_ai/tests/test_embedding.py:0: error: Function is missing a type an
|
||||
src/paperless_ai/tests/test_embedding.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_embedding.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_embedding.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_embedding.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_embedding.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_ai/tests/test_matching.py:0: error: Argument 1 to "match_tags_by_name" has incompatible type "list[str | None]"; expected "list[str]" [arg-type]
|
||||
src/paperless_ai/tests/test_matching.py:0: error: Missing type arguments for generic type "DjangoModelFactory" [type-arg]
|
||||
src/paperless_ai/tests/test_matching.py:0: error: Missing type arguments for generic type "list" [type-arg]
|
||||
@@ -2414,9 +2314,9 @@ src/paperless_ai/tests/test_vector_store.py:0: error: Function is missing a type
|
||||
src/paperless_ai/tests/test_vector_store.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless_ai/tests/test_vector_store.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless_ai/tests/test_vector_store.py:0: error: Skipping analyzing "sqlite_vec": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless_ai/vector_store.py:0: error: Argument 1 to "int" has incompatible type "int | float | str | list[str] | list[float] | list[int] | None"; expected "str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc" [arg-type]
|
||||
src/paperless_ai/vector_store.py:0: error: Argument 1 to "int" has incompatible type "int | float | str | list[str] | list[float] | list[int] | None"; expected "str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc" [arg-type]
|
||||
src/paperless_ai/vector_store.py:0: error: Argument 1 to "int" has incompatible type "str | Any | None"; expected "str | Buffer | SupportsInt | SupportsIndex | SupportsTrunc" [arg-type]
|
||||
src/paperless_ai/vector_store.py:0: error: Argument 1 to "int" has incompatible type "int | float | str | list[str] | list[float] | list[int] | None"; expected "str | Buffer | SupportsInt | SupportsIndex" [arg-type]
|
||||
src/paperless_ai/vector_store.py:0: error: Argument 1 to "int" has incompatible type "int | float | str | list[str] | list[float] | list[int] | None"; expected "str | Buffer | SupportsInt | SupportsIndex" [arg-type]
|
||||
src/paperless_ai/vector_store.py:0: error: Argument 1 to "int" has incompatible type "str | Any | None"; expected "str | Buffer | SupportsInt | SupportsIndex" [arg-type]
|
||||
src/paperless_ai/vector_store.py:0: error: Skipping analyzing "sqlite_vec": module is installed, but missing library stubs or py.typed marker [import-untyped]
|
||||
src/paperless_ai/vector_store.py:0: error: Unexpected keyword argument "flat_metadata" for "__init__" of "BasePydanticVectorStore" [call-arg]
|
||||
src/paperless_mail/admin.py:0: error: Missing type arguments for generic type "ModelAdmin" [type-arg]
|
||||
@@ -2481,6 +2381,8 @@ src/paperless_mail/migrations/0002_optimize_integer_field_sizes.py:0: error: Fun
|
||||
src/paperless_mail/migrations/0002_optimize_integer_field_sizes.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_mail/models.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_mail/models.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_mail/oauth.py:0: error: Argument "refresh_token" to "refresh_token" of "BaseOAuth2" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
src/paperless_mail/oauth.py:0: error: Argument "refresh_token" to "refresh_token" of "BaseOAuth2" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
src/paperless_mail/oauth.py:0: error: Argument 1 to "GoogleOAuth2" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
src/paperless_mail/oauth.py:0: error: Argument 1 to "MicrosoftGraphOAuth2" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
src/paperless_mail/oauth.py:0: error: Argument 2 to "GoogleOAuth2" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
@@ -2498,6 +2400,8 @@ src/paperless_mail/serialisers.py:0: error: Function is missing a type annotatio
|
||||
src/paperless_mail/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_mail/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_mail/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_mail/serialisers.py:0: error: Function is missing a type annotation [no-untyped-def]
|
||||
src/paperless_mail/serialisers.py:0: error: Function is missing a type annotation for one or more parameters [no-untyped-def]
|
||||
src/paperless_mail/tasks.py:0: error: Missing type arguments for generic type "Task" [type-arg]
|
||||
src/paperless_mail/tests/helpers.py:0: error: "MailMessage" has no attribute "flagged" [attr-defined]
|
||||
src/paperless_mail/tests/helpers.py:0: error: "MailMessage" has no attribute "seen" [attr-defined]
|
||||
|
||||
@@ -50,7 +50,7 @@ repos:
|
||||
- 'prettier-plugin-organize-imports@4.3.0'
|
||||
# Python hooks
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.17.6
|
||||
rev: v0.17.2
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
- id: ruff-format
|
||||
|
||||
+401
-1010
File diff suppressed because it is too large.
Load diff
@@ -641,20 +641,6 @@ you're running two instances of paperless on the same host.
|
||||
|
||||
Defaults to `""`, which does not alter the cookie names.
|
||||
|
||||
#### [`PAPERLESS_COOKIE_SECURE=<bool>`](#PAPERLESS_COOKIE_SECURE) {#PAPERLESS_COOKIE_SECURE}
|
||||
|
||||
: Marks the session, CSRF and language cookies with the `Secure` attribute, so browsers only send them over HTTPS. This sets the Django settings [`SESSION_COOKIE_SECURE`](https://docs.djangoproject.com/en/stable/ref/settings/#session-cookie-secure), [`CSRF_COOKIE_SECURE`](https://docs.djangoproject.com/en/stable/ref/settings/#csrf-cookie-secure) and [`LANGUAGE_COOKIE_SECURE`](https://docs.djangoproject.com/en/stable/ref/settings/#language-cookie-secure) together.
|
||||
|
||||
Enable this if you access paperless exclusively over HTTPS, for example behind a reverse proxy which terminates TLS.
|
||||
|
||||
!!! warning
|
||||
|
||||
Browsers will not send `Secure` cookies over plain HTTP, so logging in over HTTP, for example directly via a LAN address which bypasses the reverse proxy, will fail. Some browsers make an exception for `localhost`.
|
||||
|
||||
After changing this, you may have to login again.
|
||||
|
||||
Defaults to `false`.
|
||||
|
||||
#### [`PAPERLESS_ENABLE_HTTP_REMOTE_USER=<bool>`](#PAPERLESS_ENABLE_HTTP_REMOTE_USER) {#PAPERLESS_ENABLE_HTTP_REMOTE_USER}
|
||||
|
||||
: Allows authentication via HTTP_REMOTE_USER which is used by some SSO
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ docs = [
|
||||
]
|
||||
lint = [
|
||||
"prek>=0.4.11,<0.6",
|
||||
"ruff~=0.17.2",
|
||||
"ruff~=0.16.1",
|
||||
]
|
||||
testing = [
|
||||
"daphne",
|
||||
|
||||
+56
-102
@@ -332,7 +332,7 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>
|
||||
<context context-type="linenumber">218</context>
|
||||
<context context-type="linenumber">216</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/manage/document-attributes/custom-fields/custom-fields.component.html</context>
|
||||
@@ -1841,7 +1841,7 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/input/tags/tags.component.ts</context>
|
||||
<context context-type="linenumber">94</context>
|
||||
<context context-type="linenumber">93</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/suggestions-dropdown/suggestions-dropdown.component.html</context>
|
||||
@@ -2630,11 +2630,11 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">80,81</context>
|
||||
<context context-type="linenumber">76,77</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">153</context>
|
||||
<context context-type="linenumber">148</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3278307631146748151" datatype="html">
|
||||
@@ -3997,7 +3997,7 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html</context>
|
||||
<context context-type="linenumber">129</context>
|
||||
<context context-type="linenumber">125</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-detail/document-detail.component.html</context>
|
||||
@@ -4017,11 +4017,11 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">86,87</context>
|
||||
<context context-type="linenumber">82,83</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">159</context>
|
||||
<context context-type="linenumber">154</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/data/saved-view-icons.ts</context>
|
||||
@@ -4308,11 +4308,11 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html</context>
|
||||
<context context-type="linenumber">109</context>
|
||||
<context context-type="linenumber">105</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.html</context>
|
||||
<context context-type="linenumber">395</context>
|
||||
<context context-type="linenumber">391</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="7515883357904500238" datatype="html">
|
||||
@@ -4617,7 +4617,7 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">83,84</context>
|
||||
<context context-type="linenumber">79,80</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3188389494264426470" datatype="html">
|
||||
@@ -6084,7 +6084,7 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/input/tags/tags.component.html</context>
|
||||
<context context-type="linenumber">65</context>
|
||||
<context context-type="linenumber">56</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="5872175735754226507" datatype="html">
|
||||
@@ -7176,20 +7176,6 @@
|
||||
<context context-type="linenumber">874</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="7016632905329233281" datatype="html">
|
||||
<source>Tags you don't have access to</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/hidden-tags-badge/hidden-tags-badge.component.html</context>
|
||||
<context context-type="linenumber">1</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="8380614898235701745" datatype="html">
|
||||
<source><x id="INTERPOLATION" equiv-text="{{count()}}"/> hidden</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/hidden-tags-badge/hidden-tags-badge.component.html</context>
|
||||
<context context-type="linenumber">3,4</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="7005745151564974365" datatype="html">
|
||||
<source>Keyboard shortcuts</source>
|
||||
<context-group purpose="location">
|
||||
@@ -7235,10 +7221,6 @@
|
||||
<context context-type="sourcefile">src/app/components/common/input/switch/switch.component.html</context>
|
||||
<context context-type="linenumber">13</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/input/tags/tags.component.ts</context>
|
||||
<context context-type="linenumber">248</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/input/text/text.component.html</context>
|
||||
<context context-type="linenumber">9</context>
|
||||
@@ -7296,7 +7278,7 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/input/tags/tags.component.html</context>
|
||||
<context context-type="linenumber">80</context>
|
||||
<context context-type="linenumber">71</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="6344437738844463465" datatype="html">
|
||||
@@ -7458,18 +7440,11 @@
|
||||
<context context-type="linenumber">5</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="6626732174656850237" datatype="html">
|
||||
<source>Remove tags you don't have access to</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/input/tags/tags.component.html</context>
|
||||
<context context-type="linenumber">29</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3392754525167799121" datatype="html">
|
||||
<source>Remove tag</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/input/tags/tags.component.html</context>
|
||||
<context context-type="linenumber">37</context>
|
||||
<context context-type="linenumber">28</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/utils/document-operation.ts</context>
|
||||
@@ -7480,28 +7455,7 @@
|
||||
<source>Filter documents with these Tags</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/input/tags/tags.component.html</context>
|
||||
<context context-type="linenumber">70,71</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="662220925494348602" datatype="html">
|
||||
<source>Remove hidden tags</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/input/tags/tags.component.ts</context>
|
||||
<context context-type="linenumber">244</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="4678840195328848571" datatype="html">
|
||||
<source>Remove <x id="PH" equiv-text="hidden.size"/> tag(s) you don't have access to?</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/input/tags/tags.component.ts</context>
|
||||
<context context-type="linenumber">245</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="636150860182684346" datatype="html">
|
||||
<source>You will not be able to add them back.</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/common/input/tags/tags.component.ts</context>
|
||||
<context context-type="linenumber">246</context>
|
||||
<context context-type="linenumber">61,62</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="1400555558847223243" datatype="html">
|
||||
@@ -8901,55 +8855,55 @@
|
||||
<source>Filter by document type</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html</context>
|
||||
<context context-type="linenumber">89</context>
|
||||
<context context-type="linenumber">85</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">104</context>
|
||||
<context context-type="linenumber">100</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.html</context>
|
||||
<context context-type="linenumber">367</context>
|
||||
<context context-type="linenumber">363</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="157572966557284263" datatype="html">
|
||||
<source>Filter by storage path</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html</context>
|
||||
<context context-type="linenumber">94</context>
|
||||
<context context-type="linenumber">90</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">110</context>
|
||||
<context context-type="linenumber">106</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.html</context>
|
||||
<context context-type="linenumber">374</context>
|
||||
<context context-type="linenumber">370</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="883965278435032344" datatype="html">
|
||||
<source>Filter by owner</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html</context>
|
||||
<context context-type="linenumber">99</context>
|
||||
<context context-type="linenumber">95</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3542042671420335679" datatype="html">
|
||||
<source>No</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html</context>
|
||||
<context context-type="linenumber">109</context>
|
||||
<context context-type="linenumber">105</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.html</context>
|
||||
<context context-type="linenumber">395</context>
|
||||
<context context-type="linenumber">391</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="872092479747931526" datatype="html">
|
||||
<source>No documents</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html</context>
|
||||
<context context-type="linenumber">195,198</context>
|
||||
<context context-type="linenumber">191,194</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="1069523139277190436" datatype="html">
|
||||
@@ -9191,7 +9145,7 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">77,78</context>
|
||||
<context context-type="linenumber">73,74</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="1735242650910677773" datatype="html">
|
||||
@@ -10682,85 +10636,85 @@
|
||||
<source>Filter by tag</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">41</context>
|
||||
<context context-type="linenumber">40</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.html</context>
|
||||
<context context-type="linenumber">340</context>
|
||||
<context context-type="linenumber">339</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="106713086593101376" datatype="html">
|
||||
<source>View notes</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">99</context>
|
||||
<context context-type="linenumber">95</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3727324658595204357" datatype="html">
|
||||
<source>Created: <x id="INTERPOLATION" equiv-text="{{ document().created | customDate }}"/></source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">123,124</context>
|
||||
<context context-type="linenumber">119,120</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">86,87</context>
|
||||
<context context-type="linenumber">81,82</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">101,102</context>
|
||||
<context context-type="linenumber">96,97</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="2030261243264601523" datatype="html">
|
||||
<source>Added: <x id="INTERPOLATION" equiv-text="{{ document().added | customDate }}"/></source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">124,125</context>
|
||||
<context context-type="linenumber">120,121</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">87,88</context>
|
||||
<context context-type="linenumber">82,83</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">102,103</context>
|
||||
<context context-type="linenumber">97,98</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="4235671847487610290" datatype="html">
|
||||
<source>Modified: <x id="INTERPOLATION" equiv-text="{{ document().modified | customDate }}"/></source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">125,126</context>
|
||||
<context context-type="linenumber">121,122</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">88,89</context>
|
||||
<context context-type="linenumber">83,84</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">103,104</context>
|
||||
<context context-type="linenumber">98,99</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="197162226430950645" datatype="html">
|
||||
<source>{VAR_PLURAL, plural, =1 {1 page} other {<x id="INTERPOLATION"/> pages}}</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">142</context>
|
||||
<context context-type="linenumber">138</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">116</context>
|
||||
<context context-type="linenumber">111</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="5739581984228459958" datatype="html">
|
||||
<source>Shared</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">152,153</context>
|
||||
<context context-type="linenumber">148,149</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">135,136</context>
|
||||
<context context-type="linenumber">130,131</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/data/document.ts</context>
|
||||
@@ -10775,35 +10729,35 @@
|
||||
<source>Score:</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-large/document-card-large.component.html</context>
|
||||
<context context-type="linenumber">157,158</context>
|
||||
<context context-type="linenumber">153,154</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3661756380991326939" datatype="html">
|
||||
<source>Toggle tag filter</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">27</context>
|
||||
<context context-type="linenumber">25</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="4648526799630820486" datatype="html">
|
||||
<source>Toggle correspondent filter</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">53</context>
|
||||
<context context-type="linenumber">48</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="5319701482646590642" datatype="html">
|
||||
<source>Toggle document type filter</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">69</context>
|
||||
<context context-type="linenumber">64</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="8950368321707344185" datatype="html">
|
||||
<source>Toggle storage path filter</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-card-small/document-card-small.component.html</context>
|
||||
<context context-type="linenumber">76</context>
|
||||
<context context-type="linenumber">71</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3797570084942068182" datatype="html">
|
||||
@@ -10848,7 +10802,7 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>
|
||||
<context context-type="linenumber">355</context>
|
||||
<context context-type="linenumber">353</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/manage/document-attributes/document-attributes.component.html</context>
|
||||
@@ -10863,7 +10817,7 @@
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>
|
||||
<context context-type="linenumber">348</context>
|
||||
<context context-type="linenumber">346</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/manage/document-attributes/document-attributes.component.html</context>
|
||||
@@ -11127,56 +11081,56 @@
|
||||
<source>Reset filters / selection</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>
|
||||
<context context-type="linenumber">336</context>
|
||||
<context context-type="linenumber">334</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="4135055128446167640" datatype="html">
|
||||
<source>Open first [selected] document</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>
|
||||
<context context-type="linenumber">364</context>
|
||||
<context context-type="linenumber">362</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3629960544875360046" datatype="html">
|
||||
<source>Previous page</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>
|
||||
<context context-type="linenumber">380</context>
|
||||
<context context-type="linenumber">378</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3337301694210287595" datatype="html">
|
||||
<source>Next page</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>
|
||||
<context context-type="linenumber">392</context>
|
||||
<context context-type="linenumber">390</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="2155249406916744630" datatype="html">
|
||||
<source>View "<x id="PH" equiv-text="view.name ?? title"/>" saved successfully.</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>
|
||||
<context context-type="linenumber">427</context>
|
||||
<context context-type="linenumber">425</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="4646273665293421938" datatype="html">
|
||||
<source>Failed to save view "<x id="PH" equiv-text="title"/>".</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>
|
||||
<context context-type="linenumber">433</context>
|
||||
<context context-type="linenumber">431</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="6837554170707123455" datatype="html">
|
||||
<source>View "<x id="PH" equiv-text="savedView.name"/>" created successfully.</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>
|
||||
<context context-type="linenumber">502</context>
|
||||
<context context-type="linenumber">500</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="6028096992841030074" datatype="html">
|
||||
<source>View "<x id="PH" equiv-text="savedView.name"/>" created successfully, but could not update visibility settings.</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/document-list/document-list.component.ts</context>
|
||||
<context context-type="linenumber">508</context>
|
||||
<context context-type="linenumber">506</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="739880801667335279" datatype="html">
|
||||
|
||||
@@ -68,7 +68,6 @@ import exclamationCircleFill from 'bootstrap-icons/icons/exclamation-circle-fill
|
||||
import exclamationTriangleFill from 'bootstrap-icons/icons/exclamation-triangle-fill.svg'
|
||||
import exclamationTriangle from 'bootstrap-icons/icons/exclamation-triangle.svg'
|
||||
import eye from 'bootstrap-icons/icons/eye.svg'
|
||||
import eyeSlash from 'bootstrap-icons/icons/eye-slash.svg'
|
||||
import fileEarmarkArrowUp from 'bootstrap-icons/icons/file-earmark-arrow-up.svg'
|
||||
import fileEarmarkCheck from 'bootstrap-icons/icons/file-earmark-check.svg'
|
||||
import fileEarmarkDiff from 'bootstrap-icons/icons/file-earmark-diff.svg'
|
||||
@@ -235,7 +234,6 @@ export const icons: Record<string, string> = {
|
||||
exclamationTriangle,
|
||||
exclamationTriangleFill,
|
||||
eye,
|
||||
eyeSlash,
|
||||
fileEarmark,
|
||||
fileEarmarkArrowUp,
|
||||
fileEarmarkCheck,
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<span class="badge text-bg-secondary d-inline-flex align-items-center gap-1" title="Tags you don't have access to" i18n-title>
|
||||
<pngx-bs-icon name="eye-slash" width=".8em" height=".8em"></pngx-bs-icon>
|
||||
<ng-container i18n>{{count()}} hidden</ng-container>
|
||||
</span>
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing'
|
||||
import { HiddenTagsBadgeComponent } from './hidden-tags-badge.component'
|
||||
|
||||
describe('HiddenTagsBadgeComponent', () => {
|
||||
let fixture: ComponentFixture<HiddenTagsBadgeComponent>
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HiddenTagsBadgeComponent],
|
||||
})
|
||||
fixture = TestBed.createComponent(HiddenTagsBadgeComponent)
|
||||
fixture.componentRef.setInput('count', 3)
|
||||
fixture.detectChanges()
|
||||
})
|
||||
|
||||
it('should show the hidden tag count', () => {
|
||||
expect(fixture.nativeElement.textContent).toContain('3 hidden')
|
||||
})
|
||||
})
|
||||
@@ -1,15 +0,0 @@
|
||||
import { ChangeDetectionStrategy, Component, input } from '@angular/core'
|
||||
import { BootstrapIconComponent } from '../bootstrap-icon/bootstrap-icon.component'
|
||||
|
||||
/**
|
||||
* A badge indicating the number of hidden tags.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'pngx-hidden-tags-badge',
|
||||
templateUrl: './hidden-tags-badge.component.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
imports: [BootstrapIconComponent],
|
||||
})
|
||||
export class HiddenTagsBadgeComponent {
|
||||
readonly count = input.required<number>()
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
}
|
||||
<div class="position-relative" [class.col-md-9]="horizontal">
|
||||
<div class="input-group flex-nowrap">
|
||||
<ng-select #tagSelect name="tags" [items]="tags" bindLabel="name" bindValue="id" [ngModel]="value" (ngModelChange)="onModelChange($event)" [ngModelOptions]="{standalone: true}"
|
||||
<ng-select #tagSelect name="tags" [items]="tags" bindLabel="name" bindValue="id" [(ngModel)]="value" [ngModelOptions]="{standalone: true}"
|
||||
[disabled]="disabled"
|
||||
[multiple]="multiple"
|
||||
[closeOnSelect]="false"
|
||||
@@ -24,20 +24,11 @@
|
||||
<ng-template ng-label-tmp let-item="item">
|
||||
@if (isImplied(item.id)) {
|
||||
<span class="implied-tag"></span>
|
||||
} @else if (isHidden(item.id)) {
|
||||
@if (item.id === hiddenTagIds[0]) {
|
||||
<button class="tag-wrap hidden-tags btn p-0 d-flex align-items-center mw-100" (click)="removeHiddenTags()" (mousedown)="$event.stopImmediatePropagation()" type="button" title="Remove tags you don't have access to" i18n-title>
|
||||
<pngx-bs-icon name="x" style="margin-inline-end: 1px;"></pngx-bs-icon>
|
||||
<pngx-hidden-tags-badge class="d-flex" [count]="hiddenTagIds.length"></pngx-hidden-tags-badge>
|
||||
</button>
|
||||
} @else {
|
||||
<span class="implied-tag"></span>
|
||||
}
|
||||
} @else {
|
||||
<button class="tag-wrap btn p-0 d-flex align-items-center mw-100" (click)="removeBadge(item.id)" (mousedown)="$event.stopImmediatePropagation()" type="button" title="Remove tag" i18n-title>
|
||||
<pngx-bs-icon name="x" style="margin-inline-end: 1px;"></pngx-bs-icon>
|
||||
@if (item.id && tags) {
|
||||
<pngx-tag class="mw-100 overflow-hidden d-flex" [tag]="getTag(item.id)" [split]="preserveHierarchy" (click)="removeTag(item.id); $event.stopPropagation()" (parentClick)="removeTag($event)"></pngx-tag>
|
||||
<pngx-tag class="mw-100 overflow-hidden" [tag]="getTag(item.id)" [split]="preserveHierarchy" (click)="removeTag(item.id); $event.stopPropagation()" (parentClick)="removeTag($event)"></pngx-tag>
|
||||
}
|
||||
</button>
|
||||
}
|
||||
|
||||
@@ -12,15 +12,6 @@
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
// hidden tags bundle always sits after the visible tags
|
||||
::ng-deep .paperless-input-tags .ng-value:has(> .hidden-tags) {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
::ng-deep .paperless-input-tags .ng-value-container .ng-input {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
// let a long (nowrap) split badge shrink to the field instead of widening it
|
||||
ng-select,
|
||||
::ng-deep .paperless-input-tags .ng-value-container {
|
||||
|
||||
@@ -333,87 +333,4 @@ describe('TagsComponent', () => {
|
||||
).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
describe('hidden tags', () => {
|
||||
// 98, 99 are not in the tags list i.e. the user cannot view them
|
||||
beforeEach(() => {
|
||||
component.tags = tags
|
||||
component.value = [1, 98, 2, 99]
|
||||
fixture.detectChanges()
|
||||
})
|
||||
|
||||
it('should collapse hidden tags into a single badge', async () => {
|
||||
await fixture.whenStable()
|
||||
fixture.detectChanges()
|
||||
expect(component.hiddenTagIds).toEqual([98, 99])
|
||||
expect(component.isHidden(1)).toBe(false)
|
||||
const badges = fixture.nativeElement.querySelectorAll('.ng-value')
|
||||
const visible = Array.from(badges).filter(
|
||||
(b: HTMLElement) => !b.querySelector('.implied-tag')
|
||||
) as HTMLElement[]
|
||||
expect(visible).toHaveLength(3)
|
||||
expect(visible[1].textContent).toContain('2 hidden')
|
||||
})
|
||||
|
||||
it('should only recompute hidden tags when the value or tags change', () => {
|
||||
const first = component.hiddenTagIds
|
||||
expect(component.hiddenTagIds).toBe(first)
|
||||
component.value = [1, 99]
|
||||
expect(component.hiddenTagIds).toEqual([99])
|
||||
component.tags = [...tags, { id: 99, name: 'now visible' }]
|
||||
expect(component.hiddenTagIds).toEqual([])
|
||||
})
|
||||
|
||||
it('should not treat tags as hidden before tags load', () => {
|
||||
;(component as any).tagsLoaded = false
|
||||
expect(component.hiddenTagIds).toEqual([])
|
||||
})
|
||||
|
||||
it('should not treat a hidden ancestor of a visible tag as hidden', () => {
|
||||
component.tags = [{ id: 3, name: 'child', parent: 98 }]
|
||||
component.value = [3, 98]
|
||||
expect(component.hiddenTagIds).toEqual([])
|
||||
})
|
||||
|
||||
it('should keep hidden tags when ng-select changes the selection', () => {
|
||||
component.onModelChange([])
|
||||
expect(component.value).toEqual([98, 99])
|
||||
component.onModelChange([1, 10])
|
||||
expect(component.value).toEqual([1, 10, 98, 99])
|
||||
})
|
||||
|
||||
it('should skip hidden tags on backspace', () => {
|
||||
const backspace = new KeyboardEvent('keydown', { key: 'Backspace' })
|
||||
expect(component.onKeyDown(backspace)).toBe(false)
|
||||
expect(component.value).toEqual([1, 98, 99])
|
||||
expect(component.onKeyDown(backspace)).toBe(false)
|
||||
expect(component.onKeyDown(backspace)).toBe(false)
|
||||
expect(component.value).toEqual([98, 99])
|
||||
})
|
||||
|
||||
it('should remove all hidden tags after confirmation', () => {
|
||||
let propagated: number[]
|
||||
component.registerOnChange((value: number[]) => (propagated = value))
|
||||
let activeInstances: NgbModalRef[]
|
||||
modalService.activeInstances.subscribe((v) => (activeInstances = v))
|
||||
|
||||
component.removeHiddenTags()
|
||||
expect(modalService.hasOpenModals()).toBeTruthy()
|
||||
expect(component.value).toEqual([1, 98, 2, 99])
|
||||
|
||||
activeInstances[0].componentInstance.confirmClicked.emit()
|
||||
expect(component.value).toEqual([1, 2])
|
||||
expect(propagated).toEqual([1, 2])
|
||||
})
|
||||
|
||||
it('should not remove hidden tags when disabled or none exist', () => {
|
||||
component.disabled = true
|
||||
component.removeHiddenTags()
|
||||
expect(modalService.hasOpenModals()).toBeFalsy()
|
||||
component.disabled = false
|
||||
component.value = [1]
|
||||
component.removeHiddenTags()
|
||||
expect(modalService.hasOpenModals()).toBeFalsy()
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -24,10 +24,11 @@ import { Tag } from 'src/app/data/tag'
|
||||
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
|
||||
import { TagService } from 'src/app/services/rest/tag.service'
|
||||
import { SettingsService } from 'src/app/services/settings.service'
|
||||
import { getTagAncestors, partitionTags } from 'src/app/utils/tag-display'
|
||||
import {
|
||||
collapseImpliedAncestors,
|
||||
getTagAncestors,
|
||||
} from 'src/app/utils/collapse-tags'
|
||||
import { matchesSearchText } from 'src/app/utils/text-search'
|
||||
import { ConfirmDialogComponent } from '../../confirm-dialog/confirm-dialog.component'
|
||||
import { HiddenTagsBadgeComponent } from '../../hidden-tags-badge/hidden-tags-badge.component'
|
||||
import { EditDialogMode } from '../../edit-dialog/edit-dialog.component'
|
||||
import { TagEditDialogComponent } from '../../edit-dialog/tag-edit-dialog/tag-edit-dialog.component'
|
||||
import { TagComponent } from '../../tag/tag.component'
|
||||
@@ -50,7 +51,6 @@ import { TagComponent } from '../../tag/tag.component'
|
||||
ReactiveFormsModule,
|
||||
RouterModule,
|
||||
BootstrapIconComponent,
|
||||
HiddenTagsBadgeComponent,
|
||||
],
|
||||
})
|
||||
export class TagsComponent implements OnInit, ControlValueAccessor {
|
||||
@@ -85,7 +85,6 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
|
||||
ngOnInit(): void {
|
||||
this.tagService.listAll().subscribe((result) => {
|
||||
this.tags = result.results
|
||||
this.tagsLoaded = true
|
||||
this.changeDetector.markForCheck()
|
||||
})
|
||||
}
|
||||
@@ -129,8 +128,6 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
|
||||
|
||||
tags: Tag[] = []
|
||||
|
||||
private tagsLoaded = false
|
||||
|
||||
public createTagRef: (name) => void
|
||||
|
||||
public searchFn = (term: string, tag: Tag): boolean =>
|
||||
@@ -146,7 +143,8 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
|
||||
* as segments of their descendant's badge.
|
||||
*/
|
||||
isImplied(id: number): boolean {
|
||||
return !!this.value?.includes(id) && !this.display.shown.has(id)
|
||||
if (!this.showsHierarchy || !this.tags || !this.value) return false
|
||||
return !collapseImpliedAncestors(this.value, this.tagsById).includes(id)
|
||||
}
|
||||
|
||||
private get showsHierarchy(): boolean {
|
||||
@@ -156,103 +154,17 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
|
||||
)
|
||||
}
|
||||
|
||||
isHidden(id: number): boolean {
|
||||
return this.display.hiddenSet.has(id)
|
||||
}
|
||||
|
||||
/**
|
||||
* Tags that are hidden from the current user.
|
||||
*/
|
||||
get hiddenTagIds(): number[] {
|
||||
return this.display.hidden
|
||||
}
|
||||
|
||||
private displayCache: {
|
||||
value: number[]
|
||||
tagsById: Map<number, Tag>
|
||||
showsHierarchy: boolean
|
||||
tagsLoaded: boolean
|
||||
shown: Set<number>
|
||||
hidden: number[]
|
||||
hiddenSet: Set<number>
|
||||
}
|
||||
|
||||
/**
|
||||
* Partition of the current value, recomputed only when the value, tags or
|
||||
* hierarchy setting change.
|
||||
*/
|
||||
private get display() {
|
||||
const tagsById = this.tagsById
|
||||
const showsHierarchy = this.showsHierarchy
|
||||
const cached = this.displayCache
|
||||
if (
|
||||
cached?.value === this.value &&
|
||||
cached.tagsById === tagsById &&
|
||||
cached.showsHierarchy === showsHierarchy &&
|
||||
cached.tagsLoaded === this.tagsLoaded
|
||||
) {
|
||||
return cached
|
||||
}
|
||||
const { visible, hidden } = partitionTags(
|
||||
this.value,
|
||||
tagsById,
|
||||
showsHierarchy
|
||||
)
|
||||
const hiddenIds = this.tagsLoaded ? hidden : []
|
||||
this.displayCache = {
|
||||
value: this.value,
|
||||
tagsById,
|
||||
showsHierarchy,
|
||||
tagsLoaded: this.tagsLoaded,
|
||||
shown: new Set([...visible, ...hidden]),
|
||||
hidden: hiddenIds,
|
||||
hiddenSet: new Set(hiddenIds),
|
||||
}
|
||||
return this.displayCache
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the last visible tag (in case its actually a hidden ancestor or a
|
||||
* tag the user cannot view)
|
||||
* Remove the last visible tag (in case its actually a hidden ancestor)
|
||||
*/
|
||||
readonly onKeyDown = (event: KeyboardEvent): boolean => {
|
||||
if (event.key !== 'Backspace' || this.select?.searchTerm) return true
|
||||
const visible =
|
||||
this.value?.filter((id) => !this.isImplied(id) && !this.isHidden(id)) ??
|
||||
[]
|
||||
const visible = this.value?.filter((id) => !this.isImplied(id)) ?? []
|
||||
if (visible.length === (this.value?.length ?? 0)) return true
|
||||
if (visible.length) this.removeTag(visible.at(-1))
|
||||
this.removeTag(visible.at(-1))
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes from ng-select itself (e.g. clear all) never drop hidden tags,
|
||||
* those are only removed via their own badge.
|
||||
*/
|
||||
onModelChange(newValue: number[]) {
|
||||
const kept = this.hiddenTagIds.filter((id) => !newValue?.includes(id))
|
||||
this.value = [...(newValue ?? []), ...kept]
|
||||
}
|
||||
|
||||
removeHiddenTags() {
|
||||
if (this.disabled) return
|
||||
const hidden = new Set(this.hiddenTagIds)
|
||||
if (!hidden.size) return
|
||||
const modal = this.modalService.open(ConfirmDialogComponent, {
|
||||
backdrop: 'static',
|
||||
})
|
||||
modal.componentInstance.title = $localize`Remove hidden tags`
|
||||
modal.componentInstance.messageBold = $localize`Remove ${hidden.size} tag(s) you don't have access to?`
|
||||
modal.componentInstance.message = $localize`You will not be able to add them back.`
|
||||
modal.componentInstance.btnClass = 'btn-danger'
|
||||
modal.componentInstance.btnCaption = $localize`Remove`
|
||||
modal.componentInstance.confirmClicked.pipe(first()).subscribe(() => {
|
||||
modal.close()
|
||||
this.value = this.value.filter((id) => !hidden.has(id))
|
||||
this.onChange(this.value)
|
||||
})
|
||||
}
|
||||
|
||||
getTag(id: number) {
|
||||
if (this.tags) {
|
||||
return this.tags.find((tag) => tag.id == id)
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
} from 'src/app/services/permissions.service'
|
||||
import { TagService } from 'src/app/services/rest/tag.service'
|
||||
import { SettingsService } from 'src/app/services/settings.service'
|
||||
import { getTagAncestors } from 'src/app/utils/tag-display'
|
||||
import { getTagAncestors } from 'src/app/utils/collapse-tags'
|
||||
|
||||
const FOCUS_ANIMATION_MS = 200
|
||||
// matches the .split-parent min-width in tag.component.scss
|
||||
|
||||
+1
-5
@@ -76,13 +76,9 @@
|
||||
}
|
||||
}
|
||||
@case (DisplayField.TAGS) {
|
||||
@let tags = doc.tags | displayTags | async;
|
||||
@for (tagID of tags?.visible; track tagID) {
|
||||
@for (tagID of doc.tags | collapseTags | async; track tagID) {
|
||||
<pngx-tag [tagID]="tagID" [split]="true" class="ms-1 fs-6" (click)="clickTag(tagID, $event)" (parentClick)="clickTag($event)" [clickable]="true" linkTitle="Filter by tag" i18n-title></pngx-tag>
|
||||
}
|
||||
@if (tags?.hidden.length) {
|
||||
<pngx-hidden-tags-badge [count]="tags.hidden.length" class="ms-1 fs-6"></pngx-hidden-tags-badge>
|
||||
}
|
||||
}
|
||||
@case (DisplayField.DOCUMENT_TYPE) {
|
||||
@if (doc.document_type) {
|
||||
|
||||
+2
-4
@@ -1,4 +1,3 @@
|
||||
import { HiddenTagsBadgeComponent } from 'src/app/components/common/hidden-tags-badge/hidden-tags-badge.component'
|
||||
import { AsyncPipe, NgClass, NgStyle } from '@angular/common'
|
||||
import {
|
||||
Component,
|
||||
@@ -39,7 +38,7 @@ import {
|
||||
} from 'src/app/data/filter-rule-type'
|
||||
import { SavedView } from 'src/app/data/saved-view'
|
||||
import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive'
|
||||
import { DisplayTagsPipe } from 'src/app/pipes/display-tags.pipe'
|
||||
import { CollapseTagsPipe } from 'src/app/pipes/collapse-tags.pipe'
|
||||
import { CorrespondentNamePipe } from 'src/app/pipes/correspondent-name.pipe'
|
||||
import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe'
|
||||
import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe'
|
||||
@@ -77,8 +76,7 @@ import { WidgetFrameComponent } from '../widget-frame/widget-frame.component'
|
||||
DocumentTypeNamePipe,
|
||||
StoragePathNamePipe,
|
||||
AsyncPipe,
|
||||
DisplayTagsPipe,
|
||||
HiddenTagsBadgeComponent,
|
||||
CollapseTagsPipe,
|
||||
DocumentTitlePipe,
|
||||
CustomDatePipe,
|
||||
NgClass,
|
||||
|
||||
+1
-5
@@ -36,13 +36,9 @@
|
||||
{{document().title | documentTitle}}
|
||||
}
|
||||
@if (displayFields().includes(DisplayField.TAGS)) {
|
||||
@let tags = document().tags | displayTags | async;
|
||||
@for (tagID of tags?.visible; track tagID) {
|
||||
@for (tagID of document().tags | collapseTags | async; track tagID) {
|
||||
<pngx-tag [tagID]="tagID" [split]="true" linkTitle="Filter by tag" i18n-linkTitle class="ms-1" (click)="clickTag.emit(tagID);$event.stopPropagation()" (parentClick)="clickTag.emit($event)" [clickable]="clickTag.observers.length"></pngx-tag>
|
||||
}
|
||||
@if (tags?.hidden.length) {
|
||||
<pngx-hidden-tags-badge [count]="tags.hidden.length" class="ms-1"></pngx-hidden-tags-badge>
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
<div class="placeholder bg-secondary w-75 mb-3"> </div>
|
||||
|
||||
+2
-4
@@ -1,4 +1,3 @@
|
||||
import { HiddenTagsBadgeComponent } from 'src/app/components/common/hidden-tags-badge/hidden-tags-badge.component'
|
||||
import { AsyncPipe, NgOptimizedImage } from '@angular/common'
|
||||
import {
|
||||
AfterViewInit,
|
||||
@@ -21,7 +20,7 @@ import {
|
||||
Document,
|
||||
} from 'src/app/data/document'
|
||||
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
|
||||
import { DisplayTagsPipe } from 'src/app/pipes/display-tags.pipe'
|
||||
import { CollapseTagsPipe } from 'src/app/pipes/collapse-tags.pipe'
|
||||
import { CorrespondentNamePipe } from 'src/app/pipes/correspondent-name.pipe'
|
||||
import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe'
|
||||
import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe'
|
||||
@@ -47,8 +46,7 @@ import { LoadingComponentWithPermissions } from '../../loading-component/loading
|
||||
TagComponent,
|
||||
CustomFieldDisplayComponent,
|
||||
AsyncPipe,
|
||||
DisplayTagsPipe,
|
||||
HiddenTagsBadgeComponent,
|
||||
CollapseTagsPipe,
|
||||
NgOptimizedImage,
|
||||
UsernamePipe,
|
||||
CorrespondentNamePipe,
|
||||
|
||||
+2
-7
@@ -19,10 +19,8 @@
|
||||
}
|
||||
|
||||
@if (document() && displayFields().includes(DisplayField.TAGS)) {
|
||||
@let tags = document().tags | displayTags | async;
|
||||
@let visibleTagIDs = tags?.visible;
|
||||
@let showHidden = showHiddenTags(tags);
|
||||
<div class="tags d-flex flex-column text-end position-absolute me-1 fs-6" [class.tags-no-wrap]="(visibleTagIDs?.length ?? 0) + (showHidden ? 1 : 0) > 3">
|
||||
@let visibleTagIDs = document().tags | collapseTags | async;
|
||||
<div class="tags d-flex flex-column text-end position-absolute me-1 fs-6" [class.tags-no-wrap]="visibleTagIDs?.length > 3">
|
||||
@for (tagID of getTagIDs(visibleTagIDs); track tagID) {
|
||||
<pngx-tag [tagID]="tagID" [split]="true" (click)="clickTag.emit(tagID);$event.stopPropagation()" (parentClick)="clickTag.emit($event)" [clickable]="true" linkTitle="Toggle tag filter" i18n-linkTitle></pngx-tag>
|
||||
}
|
||||
@@ -31,9 +29,6 @@
|
||||
<span class="badge text-dark">+ {{moreTags}}</span>
|
||||
</div>
|
||||
}
|
||||
@if (showHidden) {
|
||||
<pngx-hidden-tags-badge [count]="tags.hidden.length"></pngx-hidden-tags-badge>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
-42
@@ -42,19 +42,6 @@ describe('DocumentCardSmallComponent', () => {
|
||||
],
|
||||
}).compileComponents()
|
||||
|
||||
jest
|
||||
.spyOn(TestBed.inject(PermissionsService), 'currentUserCan')
|
||||
.mockReturnValue(true)
|
||||
jest.spyOn(TestBed.inject(TagService), 'listAll').mockReturnValue(
|
||||
of({
|
||||
count: 8,
|
||||
all: [1, 2, 3, 4, 5, 6, 7, 8],
|
||||
results: [1, 2, 3, 4, 5, 6, 7, 8].map((id) => ({
|
||||
id,
|
||||
name: `Tag ${id}`,
|
||||
})),
|
||||
})
|
||||
)
|
||||
fixture = TestBed.createComponent(DocumentCardSmallComponent)
|
||||
component = fixture.componentInstance
|
||||
fixture.componentRef.setInput('document', Object.assign({}, doc))
|
||||
@@ -161,33 +148,4 @@ describe('DocumentCardSmallComponent', () => {
|
||||
component.mouseLeaveCard()
|
||||
expect(component.popupPreview.close).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should show hidden tags last, only when visible tags leave a slot free', () => {
|
||||
fixture.componentRef.setInput('document', {
|
||||
...component.document(),
|
||||
tags: [1, 2, 3, 98, 99],
|
||||
})
|
||||
fixture.detectChanges()
|
||||
const tagsEl = () => fixture.nativeElement.querySelector('.tags')
|
||||
expect(tagsEl().lastElementChild.textContent).toContain('2 hidden')
|
||||
|
||||
// 6 visible tags fill the limit (document has notes)
|
||||
fixture.componentRef.setInput('document', {
|
||||
...component.document(),
|
||||
tags: [1, 2, 3, 4, 5, 6, 98, 99],
|
||||
})
|
||||
fixture.detectChanges()
|
||||
expect(tagsEl().textContent).not.toContain('hidden')
|
||||
expect(
|
||||
fixture.debugElement.queryAll(By.directive(TagComponent))
|
||||
).toHaveLength(6)
|
||||
|
||||
fixture.componentRef.setInput('document', {
|
||||
...component.document(),
|
||||
tags: [1, 2, 3, 4, 5, 6, 7, 98],
|
||||
})
|
||||
fixture.detectChanges()
|
||||
expect(tagsEl().textContent).toContain('+ 2')
|
||||
expect(tagsEl().textContent).not.toContain('hidden')
|
||||
})
|
||||
})
|
||||
+2
-12
@@ -1,5 +1,3 @@
|
||||
import { TagPartition } from 'src/app/utils/tag-display'
|
||||
import { HiddenTagsBadgeComponent } from 'src/app/components/common/hidden-tags-badge/hidden-tags-badge.component'
|
||||
import { AsyncPipe, NgOptimizedImage } from '@angular/common'
|
||||
import {
|
||||
AfterViewInit,
|
||||
@@ -22,7 +20,7 @@ import {
|
||||
Document,
|
||||
} from 'src/app/data/document'
|
||||
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
|
||||
import { DisplayTagsPipe } from 'src/app/pipes/display-tags.pipe'
|
||||
import { CollapseTagsPipe } from 'src/app/pipes/collapse-tags.pipe'
|
||||
import { CorrespondentNamePipe } from 'src/app/pipes/correspondent-name.pipe'
|
||||
import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe'
|
||||
import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe'
|
||||
@@ -48,8 +46,7 @@ import { LoadingComponentWithPermissions } from '../../loading-component/loading
|
||||
TagComponent,
|
||||
CustomFieldDisplayComponent,
|
||||
AsyncPipe,
|
||||
DisplayTagsPipe,
|
||||
HiddenTagsBadgeComponent,
|
||||
CollapseTagsPipe,
|
||||
NgOptimizedImage,
|
||||
UsernamePipe,
|
||||
CorrespondentNamePipe,
|
||||
@@ -99,13 +96,6 @@ export class DocumentCardSmallComponent
|
||||
return this.document()?.notes.length > 0 ? 6 : 7
|
||||
}
|
||||
|
||||
/**
|
||||
* The hidden tags badge only fills a slot the visible tags leave free.
|
||||
*/
|
||||
showHiddenTags(tags: TagPartition): boolean {
|
||||
return tags?.hidden.length > 0 && tags.visible.length < this.tagLimit
|
||||
}
|
||||
|
||||
getMoreTags(tagIDs: number[]): number {
|
||||
const limit = this.tagLimit
|
||||
return tagIDs?.length > limit ? tagIDs.length - (limit - 1) : null
|
||||
|
||||
@@ -335,13 +335,9 @@
|
||||
<a routerLink="/documents/{{d.id}}" title="Edit document" i18n-title style="overflow-wrap: anywhere;">{{d.title | documentTitle}}</a>
|
||||
}
|
||||
@if (activeDisplayFields.includes(DisplayField.TAGS)) {
|
||||
@let tags = d.tags | displayTags | async;
|
||||
@for (tagID of tags?.visible; track tagID) {
|
||||
@for (tagID of d.tags | collapseTags | async; track tagID) {
|
||||
<pngx-tag [tagID]="tagID" [split]="true" class="ms-1 fs-6" clickable="true" linkTitle="Filter by tag" i18n-linkTitle (click)="clickTag(tagID);$event.stopPropagation()" (parentClick)="clickTag($event)"></pngx-tag>
|
||||
}
|
||||
@if (tags?.hidden.length) {
|
||||
<pngx-hidden-tags-badge [count]="tags.hidden.length" class="ms-1 fs-6"></pngx-hidden-tags-badge>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { HiddenTagsBadgeComponent } from 'src/app/components/common/hidden-tags-badge/hidden-tags-badge.component'
|
||||
import { AsyncPipe, NgClass, NgTemplateOutlet } from '@angular/common'
|
||||
import {
|
||||
Component,
|
||||
@@ -40,7 +39,7 @@ import {
|
||||
SortableDirective,
|
||||
SortEvent,
|
||||
} from 'src/app/directives/sortable.directive'
|
||||
import { DisplayTagsPipe } from 'src/app/pipes/display-tags.pipe'
|
||||
import { CollapseTagsPipe } from 'src/app/pipes/collapse-tags.pipe'
|
||||
import { CorrespondentNamePipe } from 'src/app/pipes/correspondent-name.pipe'
|
||||
import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe'
|
||||
import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe'
|
||||
@@ -98,8 +97,7 @@ import { SaveViewConfigDialogComponent } from './save-view-config-dialog/save-vi
|
||||
StoragePathNamePipe,
|
||||
BootstrapIconComponent,
|
||||
AsyncPipe,
|
||||
DisplayTagsPipe,
|
||||
HiddenTagsBadgeComponent,
|
||||
CollapseTagsPipe,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
NgTemplateOutlet,
|
||||
|
||||
+15
-29
@@ -6,7 +6,7 @@ import { Tag } from '../data/tag'
|
||||
import { PermissionsService } from '../services/permissions.service'
|
||||
import { TagService } from '../services/rest/tag.service'
|
||||
import { SettingsService } from '../services/settings.service'
|
||||
import { DisplayTagsPipe } from './display-tags.pipe'
|
||||
import { CollapseTagsPipe } from './collapse-tags.pipe'
|
||||
|
||||
const tags: Tag[] = [
|
||||
{ id: 1, name: 'Parent' },
|
||||
@@ -14,8 +14,8 @@ const tags: Tag[] = [
|
||||
{ id: 3, name: 'Other' },
|
||||
]
|
||||
|
||||
describe('DisplayTagsPipe', () => {
|
||||
let pipe: DisplayTagsPipe
|
||||
describe('CollapseTagsPipe', () => {
|
||||
let pipe: CollapseTagsPipe
|
||||
let tagService: TagService
|
||||
let settingsService: SettingsService
|
||||
let permissionsService: PermissionsService
|
||||
@@ -23,12 +23,12 @@ describe('DisplayTagsPipe', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [
|
||||
DisplayTagsPipe,
|
||||
CollapseTagsPipe,
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
],
|
||||
})
|
||||
pipe = TestBed.inject(DisplayTagsPipe)
|
||||
pipe = TestBed.inject(CollapseTagsPipe)
|
||||
tagService = TestBed.inject(TagService)
|
||||
settingsService = TestBed.inject(SettingsService)
|
||||
permissionsService = TestBed.inject(PermissionsService)
|
||||
@@ -39,43 +39,29 @@ describe('DisplayTagsPipe', () => {
|
||||
.mockReturnValue(of({ count: 3, all: [1, 2, 3], results: tags }))
|
||||
})
|
||||
|
||||
it('should split visible and hidden tags, collapsing implied parents', async () => {
|
||||
expect(await firstValueFrom(pipe.transform([1, 2, 98, 3]))).toEqual({
|
||||
visible: [2, 3],
|
||||
hidden: [98],
|
||||
})
|
||||
it('should drop parents implied by a selected child', async () => {
|
||||
expect(await firstValueFrom(pipe.transform([1, 2, 3]))).toEqual([2, 3])
|
||||
})
|
||||
|
||||
it('should not collapse parents when hierarchy display is off', async () => {
|
||||
it('should pass ids through when hierarchy display is off or not permitted', async () => {
|
||||
jest.spyOn(settingsService, 'get').mockReturnValue(false)
|
||||
expect(await firstValueFrom(pipe.transform([1, 2]))).toEqual({
|
||||
visible: [1, 2],
|
||||
hidden: [],
|
||||
})
|
||||
})
|
||||
expect(await firstValueFrom(pipe.transform([1, 2]))).toEqual([1, 2])
|
||||
|
||||
it('should hide all tags without tag view permission', async () => {
|
||||
jest.spyOn(settingsService, 'get').mockReturnValue(true)
|
||||
jest.spyOn(permissionsService, 'currentUserCan').mockReturnValue(false)
|
||||
expect(await firstValueFrom(pipe.transform([1, 2]))).toEqual({
|
||||
visible: [],
|
||||
hidden: [1, 2],
|
||||
})
|
||||
expect(await firstValueFrom(pipe.transform([1, 2]))).toEqual([1, 2])
|
||||
expect(tagService.listAll).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should handle empty input', async () => {
|
||||
const empty = { visible: [], hidden: [] }
|
||||
expect(await firstValueFrom(pipe.transform(null))).toEqual(empty)
|
||||
expect(await firstValueFrom(pipe.transform([]))).toEqual(empty)
|
||||
expect(await firstValueFrom(pipe.transform(null))).toEqual([])
|
||||
expect(await firstValueFrom(pipe.transform([]))).toEqual([])
|
||||
})
|
||||
|
||||
it('should show the original ids if tags fail to load', async () => {
|
||||
it('should fall back to the original ids if tags fail to load', async () => {
|
||||
jest
|
||||
.spyOn(tagService, 'listAll')
|
||||
.mockReturnValue(throwError(() => new Error('failed')))
|
||||
expect(await firstValueFrom(pipe.transform([1, 2]))).toEqual({
|
||||
visible: [1, 2],
|
||||
hidden: [],
|
||||
})
|
||||
expect(await firstValueFrom(pipe.transform([1, 2]))).toEqual([1, 2])
|
||||
})
|
||||
})
|
||||
+12
-12
@@ -9,39 +9,39 @@ import {
|
||||
} from '../services/permissions.service'
|
||||
import { TagService } from '../services/rest/tag.service'
|
||||
import { SettingsService } from '../services/settings.service'
|
||||
import { partitionTags, TagPartition } from '../utils/tag-display'
|
||||
import { collapseImpliedAncestors } from '../utils/collapse-tags'
|
||||
|
||||
/**
|
||||
* Splits a document's tag IDs into regular ones vs those the
|
||||
* current user cannot view, see partitionTags.
|
||||
* Drops tag IDs whose descendant is also in the list for when the child's
|
||||
* Tag badge already shows its parent.
|
||||
*/
|
||||
@Pipe({
|
||||
name: 'displayTags',
|
||||
name: 'collapseTags',
|
||||
})
|
||||
export class DisplayTagsPipe implements PipeTransform {
|
||||
export class CollapseTagsPipe implements PipeTransform {
|
||||
private readonly permissionsService = inject(PermissionsService)
|
||||
private readonly tagService = inject(TagService)
|
||||
private readonly settingsService = inject(SettingsService)
|
||||
|
||||
transform(ids: number[]): Observable<TagPartition> {
|
||||
if (!ids?.length) return of({ visible: [], hidden: [] })
|
||||
transform(ids: number[]): Observable<number[]> {
|
||||
if (
|
||||
!ids?.length ||
|
||||
!this.settingsService.get(SETTINGS_KEYS.TAGS_SHOW_HIERARCHY) ||
|
||||
!this.permissionsService.currentUserCan(
|
||||
PermissionAction.View,
|
||||
PermissionType.Tag
|
||||
)
|
||||
) {
|
||||
return of({ visible: [], hidden: ids })
|
||||
return of(ids ?? [])
|
||||
}
|
||||
return this.tagService.listAll().pipe(
|
||||
map((tags) =>
|
||||
partitionTags(
|
||||
collapseImpliedAncestors(
|
||||
ids,
|
||||
new Map<number, Tag>(tags.results.map((t) => [t.id, t])),
|
||||
!!this.settingsService.get(SETTINGS_KEYS.TAGS_SHOW_HIERARCHY)
|
||||
new Map<number, Tag>(tags.results.map((t) => [t.id, t]))
|
||||
)
|
||||
),
|
||||
catchError(() => of({ visible: ids, hidden: [] }))
|
||||
catchError(() => of(ids))
|
||||
)
|
||||
}
|
||||
}
|
||||
+1
-35
@@ -1,9 +1,5 @@
|
||||
import { Tag } from '../data/tag'
|
||||
import {
|
||||
collapseImpliedAncestors,
|
||||
getTagAncestors,
|
||||
partitionTags,
|
||||
} from './tag-display'
|
||||
import { collapseImpliedAncestors, getTagAncestors } from './collapse-tags'
|
||||
|
||||
const tags: Tag[] = [
|
||||
{ id: 1, name: 'Finance' },
|
||||
@@ -49,33 +45,3 @@ describe('getTagAncestors', () => {
|
||||
expect(getTagAncestors(7, cyclic).map((t) => t.id)).toEqual([7, 8])
|
||||
})
|
||||
})
|
||||
|
||||
describe('partitionTags', () => {
|
||||
it('splits ids into visible and hidden, keeping order', () => {
|
||||
expect(partitionTags([5, 98, 4, 99], tagsById, true)).toEqual({
|
||||
visible: [5, 4],
|
||||
hidden: [98, 99],
|
||||
})
|
||||
expect(partitionTags(null, tagsById, true)).toEqual({
|
||||
visible: [],
|
||||
hidden: [],
|
||||
})
|
||||
})
|
||||
|
||||
it('drops implied ancestors only when showing hierarchy', () => {
|
||||
expect(partitionTags([1, 2, 3], tagsById, true).visible).toEqual([3])
|
||||
expect(partitionTags([1, 2, 3], tagsById, false).visible).toEqual([1, 2, 3])
|
||||
})
|
||||
|
||||
it('drops a hidden ancestor of a visible tag only when showing hierarchy', () => {
|
||||
const withHiddenParent = new Map(tagsById)
|
||||
withHiddenParent.set(6, { id: 6, name: 'Child', parent: 98 })
|
||||
expect(partitionTags([6, 98, 99], withHiddenParent, true)).toEqual({
|
||||
visible: [6],
|
||||
hidden: [99],
|
||||
})
|
||||
expect(partitionTags([6, 98, 99], withHiddenParent, false).hidden).toEqual([
|
||||
98, 99,
|
||||
])
|
||||
})
|
||||
})
|
||||
@@ -41,27 +41,3 @@ export function getTagAncestors(id: number, tagsById: Map<number, Tag>): Tag[] {
|
||||
}
|
||||
return chain
|
||||
}
|
||||
|
||||
export interface TagPartition {
|
||||
visible: number[]
|
||||
hidden: number[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits a document's tag IDs for display. Tags missing from tagsById are hidden
|
||||
* from the current user and when showing hierarchy, ancestors of a child are dropped
|
||||
* since the descendant badge will show them.
|
||||
*/
|
||||
export function partitionTags(
|
||||
ids: number[],
|
||||
tagsById: Map<number, Tag>,
|
||||
showHierarchy: boolean
|
||||
): TagPartition {
|
||||
const shown = showHierarchy
|
||||
? collapseImpliedAncestors(ids, tagsById)
|
||||
: (ids ?? [])
|
||||
return {
|
||||
visible: shown.filter((id) => tagsById.has(id)),
|
||||
hidden: shown.filter((id) => !tagsById.has(id)),
|
||||
}
|
||||
}
|
||||
@@ -415,17 +415,10 @@ th[pngxSortable] {
|
||||
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
// split ng-select's 5px bottom margin so values stay vertically centered
|
||||
margin-block: 2.5px;
|
||||
}
|
||||
|
||||
.ng-select.ng-select-multiple .ng-select-container .ng-value-container {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
// undo bootstrap's .btn .badge nudge
|
||||
.tag-wrap .badge {
|
||||
top: 0;
|
||||
padding-top: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+19
-10
@@ -15,7 +15,6 @@ from django.db import transaction
|
||||
from django.db.models import Max
|
||||
from django.db.models import Q
|
||||
from django.utils import timezone
|
||||
from filelock import FileLock
|
||||
from rest_framework.reverse import reverse
|
||||
|
||||
from documents.barcodes import read_barcode_values
|
||||
@@ -27,7 +26,10 @@ from documents.file_handling import create_source_path_directory
|
||||
from documents.file_handling import generate_filename
|
||||
from documents.file_handling import generate_unique_filename
|
||||
from documents.file_handling import validate_path_in_root
|
||||
from documents.file_moves import defer_file_moves
|
||||
from documents.file_moves import flush_pending_file_moves
|
||||
from documents.loggers import LoggingMixin
|
||||
from documents.media_lock import media_lock
|
||||
from documents.models import Correspondent
|
||||
from documents.models import CustomField
|
||||
from documents.models import CustomFieldInstance
|
||||
@@ -623,7 +625,13 @@ class ConsumerPlugin(
|
||||
# now that everything is done, we can start to store the document
|
||||
# in the system. This will be a transaction and reasonably fast.
|
||||
try:
|
||||
with transaction.atomic():
|
||||
# File moves requested in here run after commit and after
|
||||
# media.lock is released. media.lock is taken before the
|
||||
# transaction: the version path locks the root row with
|
||||
# select_for_update, and workflow email actions and file
|
||||
# placement below re-enter media.lock instead of waiting
|
||||
# on it while rows are locked.
|
||||
with defer_file_moves(), media_lock(), transaction.atomic():
|
||||
# store the document.
|
||||
if self.input_doc.root_document_id:
|
||||
# If this is a new version of an existing document, we need
|
||||
@@ -714,7 +722,7 @@ class ConsumerPlugin(
|
||||
|
||||
# After everything is in the database, copy the files into
|
||||
# place. If this fails, we'll also rollback the transaction.
|
||||
with FileLock(settings.MEDIA_LOCK):
|
||||
with media_lock():
|
||||
generated_filename = generate_unique_filename(document)
|
||||
if (
|
||||
len(str(generated_filename))
|
||||
@@ -778,10 +786,9 @@ class ConsumerPlugin(
|
||||
document.archive_path,
|
||||
)
|
||||
|
||||
# Don't save with the lock active. Saving will cause the file
|
||||
# renaming logic to acquire the lock as well.
|
||||
# This triggers things like file renaming
|
||||
document.save()
|
||||
# Any filename follow-up from this save is deferred by
|
||||
# the scope above until after commit.
|
||||
document.save(write_file_paths=True)
|
||||
|
||||
if document.root_document_id:
|
||||
document_updated.send(
|
||||
@@ -822,6 +829,11 @@ class ConsumerPlugin(
|
||||
exception=e,
|
||||
)
|
||||
|
||||
# The storage scope above nests under the consume task's scope, so its
|
||||
# moves are still pending; place the file before the script reads its path.
|
||||
flush_pending_file_moves()
|
||||
document.refresh_from_db()
|
||||
|
||||
self.run_post_consume_script(document)
|
||||
|
||||
self.log.info(f"Document {document} consumption finished")
|
||||
@@ -834,9 +846,6 @@ class ConsumerPlugin(
|
||||
document.id,
|
||||
)
|
||||
|
||||
# Return the most up to date fields
|
||||
document.refresh_from_db()
|
||||
|
||||
return ConsumeFileSuccessResult(document_id=document.pk)
|
||||
|
||||
def _parse_title_placeholders(self, title: str) -> str:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import abc
|
||||
import filecmp
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
@@ -167,18 +166,11 @@ class DirectoryExportSink(ExportSink):
|
||||
|
||||
@staticmethod
|
||||
def _content_unchanged(target: Path, new_bytes: bytes) -> bool:
|
||||
"""
|
||||
True if ``target`` already holds byte-identical content (BLAKE2b).
|
||||
|
||||
The existing file is hashed in chunks rather than read into memory.
|
||||
"""
|
||||
if target.stat().st_size != len(new_bytes):
|
||||
return False
|
||||
with target.open("rb") as handle:
|
||||
return (
|
||||
hashlib.file_digest(handle, "blake2b").hexdigest()
|
||||
== hashlib.blake2b(new_bytes).hexdigest()
|
||||
)
|
||||
"""True if ``target`` already holds byte-identical content (BLAKE2b)."""
|
||||
return (
|
||||
hashlib.blake2b(target.read_bytes()).hexdigest()
|
||||
== hashlib.blake2b(new_bytes).hexdigest()
|
||||
)
|
||||
|
||||
def add_json(self, content: list | dict, arcname: str) -> None:
|
||||
target = (self._target / arcname).resolve()
|
||||
@@ -222,9 +214,10 @@ class DirectoryExportSink(ExportSink):
|
||||
def _commit_streamed_file(self, target: Path, tmp: Path) -> None:
|
||||
if target in self._snapshot:
|
||||
self._snapshot.discard(target)
|
||||
# A streamed manifest can be very large, so compare the two files
|
||||
# in chunks instead of reading them into memory
|
||||
if self._compare_json and filecmp.cmp(target, tmp, shallow=False):
|
||||
if self._compare_json and self._content_unchanged(
|
||||
target,
|
||||
tmp.read_bytes(),
|
||||
):
|
||||
tmp.unlink()
|
||||
return
|
||||
tmp.rename(target)
|
||||
|
||||
@@ -0,0 +1,480 @@
|
||||
"""
|
||||
Document file moves, coalesced to once per unit of work.
|
||||
|
||||
Every save that can change a document's generated filename asks for a file
|
||||
move through request_file_move(). Inside a scope opened by defer_file_moves()
|
||||
(a request, a Celery task, the consumer, or a per-item command step) the
|
||||
request is only recorded, and the outermost scope moves each recorded document
|
||||
once, after its own writes have committed. Outside any scope the move happens
|
||||
immediately.
|
||||
|
||||
The mover always takes media.lock first and then reads the document fresh, so
|
||||
it starts from the latest committed state and never waits on media.lock while
|
||||
its own transaction holds document rows.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import shutil
|
||||
import threading
|
||||
from contextlib import asynccontextmanager
|
||||
from contextlib import contextmanager
|
||||
from contextvars import ContextVar
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import Final
|
||||
|
||||
from asgiref.sync import sync_to_async
|
||||
from django.conf import settings
|
||||
from django.db import DatabaseError
|
||||
from django.db import transaction
|
||||
from django.utils import timezone
|
||||
from filelock import Timeout
|
||||
|
||||
from documents.caching import clear_document_caches
|
||||
from documents.file_handling import create_source_path_directory
|
||||
from documents.file_handling import delete_empty_directories
|
||||
from documents.file_handling import generate_filename
|
||||
from documents.file_handling import generate_unique_filename
|
||||
from documents.media_lock import media_lock
|
||||
from documents.models import Document
|
||||
from documents.utils import compute_checksum
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import AsyncIterator
|
||||
from collections.abc import Iterator
|
||||
|
||||
logger = logging.getLogger("paperless.handlers")
|
||||
|
||||
MEDIA_LOCK_TIMEOUT_SECONDS: Final[int] = 300
|
||||
|
||||
|
||||
class CannotMoveFilesException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def in_user_transaction() -> bool:
|
||||
"""
|
||||
True when the default connection is inside an atomic block that was not
|
||||
created by Django's test case machinery.
|
||||
|
||||
Django marks the atomic blocks TestCase (and pytest-django) wrap around
|
||||
each test with _from_testcase. Ignoring them keeps tests on the same path
|
||||
as production.
|
||||
"""
|
||||
connection = transaction.get_connection()
|
||||
return any(not block._from_testcase for block in connection.atomic_blocks)
|
||||
|
||||
|
||||
class FileMoveCollector:
|
||||
"""Pending document pks for one file move scope."""
|
||||
|
||||
def __init__(self) -> None:
|
||||
self._pending: set[int] = set()
|
||||
self._lock = threading.Lock()
|
||||
self.closed = False
|
||||
|
||||
def add(self, pk: int) -> bool:
|
||||
"""Record a pending move. Returns False if the collector is closed."""
|
||||
with self._lock:
|
||||
if self.closed:
|
||||
return False
|
||||
self._pending.add(pk)
|
||||
return True
|
||||
|
||||
def take_pending(self) -> list[int]:
|
||||
"""Remove and return the pending pks, sorted, leaving the collector open."""
|
||||
with self._lock:
|
||||
pending = sorted(self._pending)
|
||||
self._pending.clear()
|
||||
return pending
|
||||
|
||||
def close(self) -> list[int]:
|
||||
"""Close the collector and return what was still pending, sorted."""
|
||||
with self._lock:
|
||||
self.closed = True
|
||||
pending = sorted(self._pending)
|
||||
self._pending.clear()
|
||||
return pending
|
||||
|
||||
|
||||
# Only the scope context managers call set() / reset(). Everything else reads
|
||||
# it and mutates the collector, so adds made in a copied context (thread or
|
||||
# task hops) are visible to the scope that flushes.
|
||||
_active_collector: ContextVar[FileMoveCollector | None] = ContextVar(
|
||||
"paperless_file_move_collector",
|
||||
default=None,
|
||||
)
|
||||
|
||||
|
||||
def _path_matches_checksum(path: Path, checksum: str | None) -> bool:
|
||||
if checksum is None or not path.is_file():
|
||||
return False
|
||||
|
||||
return compute_checksum(path) == checksum
|
||||
|
||||
|
||||
def move_files_for_document(pk: int) -> Document | None:
|
||||
"""
|
||||
Move the document's original and archive to the paths its current
|
||||
committed state generates, then do the same for its versions.
|
||||
|
||||
Returns the fresh instance with its final filename columns, or None when
|
||||
the document does not exist, has no filename yet, or the lock timed out.
|
||||
"""
|
||||
# Cheap check without the lock: most saves during consumption happen
|
||||
# before the file is placed. filename is never cleared once set, so this
|
||||
# stays true under the lock. values_list() keeps the check off
|
||||
# Document.global_objects.filter(), which tests patch to inject database
|
||||
# errors into and observe the mover's own writes.
|
||||
filename = (
|
||||
Document.global_objects.values_list("filename", flat=True).filter(pk=pk).first()
|
||||
)
|
||||
if not filename:
|
||||
return None
|
||||
|
||||
try:
|
||||
with media_lock(timeout=MEDIA_LOCK_TIMEOUT_SECONDS):
|
||||
try:
|
||||
document = Document.global_objects.get(pk=pk)
|
||||
except Document.DoesNotExist:
|
||||
logger.debug(f"Document {pk} no longer exists, skipping file move")
|
||||
return None
|
||||
_move_document_files(document)
|
||||
except Timeout:
|
||||
logger.error(
|
||||
f"Timed out after {MEDIA_LOCK_TIMEOUT_SECONDS}s waiting for "
|
||||
f"{settings.MEDIA_LOCK} to move files of document {pk}; the file "
|
||||
f"keeps its current name and will be renamed on its next save",
|
||||
)
|
||||
return None
|
||||
|
||||
# Keep version files in sync with root
|
||||
if document.root_document_id is None:
|
||||
version_pks = list(
|
||||
Document.global_objects.values_list("pk", flat=True).filter(
|
||||
root_document_id=pk,
|
||||
),
|
||||
)
|
||||
for version_pk in version_pks:
|
||||
move_files_for_document(version_pk)
|
||||
|
||||
return document
|
||||
|
||||
|
||||
def _flush(pks: list[int]) -> None:
|
||||
"""Move each document; one failure never stops the rest or raises."""
|
||||
for pk in pks:
|
||||
try:
|
||||
move_files_for_document(pk)
|
||||
except Exception:
|
||||
logger.exception(f"Unexpected error moving files of document {pk}")
|
||||
|
||||
|
||||
def _flush_after_commit(pks: list[int]) -> None:
|
||||
if not pks:
|
||||
return
|
||||
if in_user_transaction():
|
||||
transaction.on_commit(lambda: _flush(pks))
|
||||
else:
|
||||
_flush(pks)
|
||||
|
||||
|
||||
def _close_and_flush(collector: FileMoveCollector) -> None:
|
||||
_flush_after_commit(collector.close())
|
||||
|
||||
|
||||
@contextmanager
|
||||
def defer_file_moves() -> Iterator[None]:
|
||||
"""
|
||||
Collect file move requests and perform each once when the outermost scope
|
||||
exits, after its own writes have committed.
|
||||
"""
|
||||
current = _active_collector.get()
|
||||
if current is not None and not current.closed:
|
||||
yield
|
||||
return
|
||||
|
||||
collector = FileMoveCollector()
|
||||
token = _active_collector.set(collector)
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
_active_collector.reset(token)
|
||||
_close_and_flush(collector)
|
||||
|
||||
|
||||
def flush_pending_file_moves() -> None:
|
||||
"""
|
||||
Perform the current scope's pending moves now, keeping the scope open.
|
||||
|
||||
From an eager task inside a request this flushes the request's collector
|
||||
early, which is harmless: moves still run after commit, on fresh state.
|
||||
"""
|
||||
collector = _active_collector.get()
|
||||
if collector is None:
|
||||
return
|
||||
_flush_after_commit(collector.take_pending())
|
||||
|
||||
|
||||
def _validate_move(
|
||||
document: Document,
|
||||
old_path: Path,
|
||||
new_path: Path,
|
||||
root: Path,
|
||||
) -> None:
|
||||
if not new_path.is_relative_to(root):
|
||||
msg = (
|
||||
f"Document {document!s}: Refusing to move file outside root {root}: "
|
||||
f"{new_path}."
|
||||
)
|
||||
logger.warning(msg)
|
||||
raise CannotMoveFilesException(msg)
|
||||
|
||||
if not old_path.is_file():
|
||||
# Can't do anything if the old file does not exist anymore.
|
||||
msg = f"Document {document!s}: File {old_path} doesn't exist."
|
||||
logger.fatal(msg)
|
||||
raise CannotMoveFilesException(msg)
|
||||
|
||||
if new_path.is_file():
|
||||
# Can't do anything if the new file already exists. Skip updating file.
|
||||
msg = f"Document {document!s}: Cannot rename file since target path {new_path} already exists."
|
||||
logger.warning(msg)
|
||||
raise CannotMoveFilesException(msg)
|
||||
|
||||
|
||||
def _move_document_files(document: Document) -> None:
|
||||
try:
|
||||
old_filename = document.filename
|
||||
old_source_path = document.source_path
|
||||
move_original = False
|
||||
original_already_moved = False
|
||||
original_moved = False
|
||||
|
||||
old_archive_filename = document.archive_filename
|
||||
old_archive_path = document.archive_path
|
||||
move_archive = False
|
||||
archive_already_moved = False
|
||||
archive_moved = False
|
||||
|
||||
candidate_filename = generate_filename(document)
|
||||
if len(str(candidate_filename)) > Document.MAX_STORED_FILENAME_LENGTH:
|
||||
msg = (
|
||||
f"Document {document!s}: Generated filename exceeds db path "
|
||||
f"limit ({len(str(candidate_filename))} > "
|
||||
f"{Document.MAX_STORED_FILENAME_LENGTH}): {candidate_filename!s}"
|
||||
)
|
||||
logger.warning(msg)
|
||||
raise CannotMoveFilesException(msg)
|
||||
|
||||
candidate_source_path = (settings.ORIGINALS_DIR / candidate_filename).resolve()
|
||||
if candidate_filename == Path(old_filename):
|
||||
new_filename = Path(old_filename)
|
||||
elif (
|
||||
candidate_source_path.exists() and candidate_source_path != old_source_path
|
||||
):
|
||||
if not old_source_path.is_file() and _path_matches_checksum(
|
||||
candidate_source_path,
|
||||
document.checksum,
|
||||
):
|
||||
new_filename = candidate_filename
|
||||
original_already_moved = True
|
||||
else:
|
||||
# Only fall back to unique search when there is an actual conflict
|
||||
new_filename = generate_unique_filename(document)
|
||||
else:
|
||||
new_filename = candidate_filename
|
||||
|
||||
# Need to convert to string to be able to save it to the db
|
||||
document.filename = str(new_filename)
|
||||
move_original = old_filename != document.filename and not original_already_moved
|
||||
|
||||
if document.has_archive_version:
|
||||
archive_candidate = generate_filename(document, archive_filename=True)
|
||||
if len(str(archive_candidate)) > Document.MAX_STORED_FILENAME_LENGTH:
|
||||
msg = (
|
||||
f"Document {document!s}: Generated archive filename exceeds "
|
||||
f"db path limit ({len(str(archive_candidate))} > "
|
||||
f"{Document.MAX_STORED_FILENAME_LENGTH}): {archive_candidate!s}"
|
||||
)
|
||||
logger.warning(msg)
|
||||
raise CannotMoveFilesException(msg)
|
||||
archive_candidate_path = (
|
||||
settings.ARCHIVE_DIR / archive_candidate
|
||||
).resolve()
|
||||
if archive_candidate == Path(old_archive_filename):
|
||||
new_archive_filename = Path(old_archive_filename)
|
||||
elif (
|
||||
archive_candidate_path.exists()
|
||||
and archive_candidate_path != old_archive_path
|
||||
):
|
||||
if not old_archive_path.is_file() and _path_matches_checksum(
|
||||
archive_candidate_path,
|
||||
document.archive_checksum,
|
||||
):
|
||||
new_archive_filename = archive_candidate
|
||||
archive_already_moved = True
|
||||
else:
|
||||
new_archive_filename = generate_unique_filename(
|
||||
document,
|
||||
archive_filename=True,
|
||||
)
|
||||
else:
|
||||
new_archive_filename = archive_candidate
|
||||
|
||||
document.archive_filename = str(new_archive_filename)
|
||||
|
||||
move_archive = (
|
||||
old_archive_filename != document.archive_filename
|
||||
and not archive_already_moved
|
||||
)
|
||||
else:
|
||||
move_archive = False
|
||||
|
||||
if not move_original and not move_archive:
|
||||
updates: dict[str, object] = {}
|
||||
if old_filename != document.filename:
|
||||
updates["filename"] = document.filename
|
||||
if old_archive_filename != document.archive_filename:
|
||||
updates["archive_filename"] = document.archive_filename
|
||||
if updates:
|
||||
# global_objects so a trashed document's path is fixed too.
|
||||
updates["modified"] = timezone.now()
|
||||
# Don't save() here to prevent infinite recursion.
|
||||
Document.global_objects.filter(pk=document.pk).update(**updates)
|
||||
return
|
||||
|
||||
if move_original:
|
||||
_validate_move(
|
||||
document,
|
||||
old_source_path,
|
||||
document.source_path,
|
||||
settings.ORIGINALS_DIR,
|
||||
)
|
||||
create_source_path_directory(document.source_path)
|
||||
shutil.move(old_source_path, document.source_path)
|
||||
original_moved = True
|
||||
|
||||
if move_archive:
|
||||
_validate_move(
|
||||
document,
|
||||
old_archive_path,
|
||||
document.archive_path,
|
||||
settings.ARCHIVE_DIR,
|
||||
)
|
||||
create_source_path_directory(document.archive_path)
|
||||
shutil.move(old_archive_path, document.archive_path)
|
||||
archive_moved = True
|
||||
|
||||
# Don't save() here to prevent infinite recursion.
|
||||
Document.global_objects.filter(pk=document.pk).update(
|
||||
filename=document.filename,
|
||||
archive_filename=document.archive_filename,
|
||||
modified=timezone.now(),
|
||||
)
|
||||
# Clear any caching for this document. Slightly overkill, but not terrible
|
||||
clear_document_caches(document.pk)
|
||||
|
||||
except (OSError, DatabaseError, CannotMoveFilesException) as e:
|
||||
logger.warning(f"Exception during file handling: {e}")
|
||||
# This happens when either:
|
||||
# - moving the files failed due to file system errors
|
||||
# - saving to the database failed due to database errors
|
||||
# In both cases, we need to revert to the original state.
|
||||
|
||||
# Try to move files to their original location.
|
||||
try:
|
||||
# Only undo moves this call made. A refused move leaves a file at
|
||||
# the target that is not ours, and moving it back would overwrite
|
||||
# the original.
|
||||
if original_moved and document.source_path.is_file():
|
||||
logger.info("Restoring previous original path")
|
||||
shutil.move(document.source_path, old_source_path)
|
||||
|
||||
if archive_moved and document.archive_path.is_file():
|
||||
logger.info("Restoring previous archive path")
|
||||
shutil.move(document.archive_path, old_archive_path)
|
||||
|
||||
except Exception:
|
||||
# This is fine, since:
|
||||
# A: if we managed to move source from A to B, we will also
|
||||
# manage to move it from B to A. If not, we have a serious
|
||||
# issue that's going to get caught by the santiy checker.
|
||||
# All files remain in place and will never be overwritten,
|
||||
# so this is not the end of the world.
|
||||
# B: if moving the original file failed, nothing has changed
|
||||
# anyway.
|
||||
pass
|
||||
|
||||
# restore old values on the document
|
||||
document.filename = old_filename
|
||||
document.archive_filename = old_archive_filename
|
||||
|
||||
# finally, remove any empty sub folders. This will do nothing if
|
||||
# something has failed above.
|
||||
if not old_source_path.is_file():
|
||||
delete_empty_directories(
|
||||
Path(old_source_path).parent,
|
||||
root=settings.ORIGINALS_DIR,
|
||||
)
|
||||
|
||||
if document.has_archive_version and not old_archive_path.is_file():
|
||||
delete_empty_directories(
|
||||
Path(old_archive_path).parent,
|
||||
root=settings.ARCHIVE_DIR,
|
||||
)
|
||||
|
||||
|
||||
def request_file_move(document: Document) -> None:
|
||||
"""
|
||||
Ask for the document's files to follow its committed state.
|
||||
|
||||
Inside an open scope the request is recorded and performed when the scope
|
||||
ends. Inside a user transaction with no scope it runs on commit. Otherwise
|
||||
the move happens now and only the final filename columns are copied onto
|
||||
the caller's instance, so source_path is current after save() while other
|
||||
in-memory fields are left alone.
|
||||
"""
|
||||
collector = _active_collector.get()
|
||||
if collector is not None and collector.add(document.pk):
|
||||
return
|
||||
|
||||
if in_user_transaction():
|
||||
# An enclosing transaction can still roll back the filename columns,
|
||||
# and the move would take media.lock while it holds document rows.
|
||||
# Wait for the commit, so the caller's instance keeps its old paths.
|
||||
pk = document.pk
|
||||
transaction.on_commit(lambda: _flush([pk]))
|
||||
return
|
||||
|
||||
moved = move_files_for_document(document.pk)
|
||||
if moved is not None:
|
||||
document.filename = moved.filename
|
||||
document.archive_filename = moved.archive_filename
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def adefer_file_moves() -> AsyncIterator[None]:
|
||||
"""
|
||||
Async twin of defer_file_moves().
|
||||
|
||||
When something was collected, the flush runs through sync_to_async: its
|
||||
transaction check needs the thread owning the DB connection, and the
|
||||
blocking media.lock must never run on the event loop.
|
||||
"""
|
||||
current = _active_collector.get()
|
||||
if current is not None and not current.closed:
|
||||
yield
|
||||
return
|
||||
|
||||
collector = FileMoveCollector()
|
||||
token = _active_collector.set(collector)
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
_active_collector.reset(token)
|
||||
pks = collector.close()
|
||||
if pks:
|
||||
await sync_to_async(_flush_after_commit, thread_sensitive=True)(pks)
|
||||
@@ -4,9 +4,9 @@ from dataclasses import dataclass
|
||||
from email import message_from_bytes
|
||||
from pathlib import Path
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.mail import EmailMessage
|
||||
from filelock import FileLock
|
||||
|
||||
from documents.media_lock import media_lock
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -48,7 +48,7 @@ def send_email(
|
||||
used_filenames: set[str] = set()
|
||||
|
||||
# Something could be renaming the file concurrently so it can't be attached
|
||||
with FileLock(settings.MEDIA_LOCK):
|
||||
with media_lock():
|
||||
for attachment in attachments:
|
||||
filename = _get_unique_filename(
|
||||
attachment.friendly_name,
|
||||
|
||||
@@ -18,10 +18,11 @@ from django.core import serializers
|
||||
from django.core.management.base import CommandError
|
||||
from django.db import transaction
|
||||
from django.utils import timezone
|
||||
from filelock import FileLock
|
||||
from guardian.models import GroupObjectPermission
|
||||
from guardian.models import UserObjectPermission
|
||||
|
||||
from documents.media_lock import media_lock
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Generator
|
||||
|
||||
@@ -330,7 +331,7 @@ class Command(CryptMixin, PaperlessCommand):
|
||||
)
|
||||
|
||||
# Prevent any ongoing changes in the documents while exporting
|
||||
with FileLock(settings.MEDIA_LOCK), sink:
|
||||
with media_lock(), sink:
|
||||
self.dump(sink)
|
||||
|
||||
def dump(self, sink: ExportSink) -> None:
|
||||
|
||||
@@ -29,7 +29,6 @@ from django.db.models import GeneratedField
|
||||
from django.db.models import Model
|
||||
from django.db.models.signals import m2m_changed
|
||||
from django.db.models.signals import post_save
|
||||
from filelock import FileLock
|
||||
from guardian.shortcuts import clear_ct_cache
|
||||
|
||||
from documents.export.compression import compress_type_readable
|
||||
@@ -37,6 +36,7 @@ from documents.export.compression import unreadable_method_names
|
||||
from documents.file_handling import create_source_path_directory
|
||||
from documents.management.commands.base import PaperlessCommand
|
||||
from documents.management.commands.mixins import CryptMixin
|
||||
from documents.media_lock import media_lock
|
||||
from documents.models import Correspondent
|
||||
from documents.models import CustomField
|
||||
from documents.models import CustomFieldInstance
|
||||
@@ -662,7 +662,7 @@ class Command(CryptMixin, PaperlessCommand):
|
||||
else:
|
||||
archive_path = None
|
||||
|
||||
with FileLock(settings.MEDIA_LOCK):
|
||||
with media_lock():
|
||||
if Path(document.source_path).is_file():
|
||||
raise FileExistsError(document.source_path)
|
||||
|
||||
@@ -696,7 +696,7 @@ class Command(CryptMixin, PaperlessCommand):
|
||||
f"Share link bundle {bundle.pk} does not have a valid file path.",
|
||||
)
|
||||
|
||||
with FileLock(settings.MEDIA_LOCK):
|
||||
with media_lock():
|
||||
bundle_target_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
copy_file_with_basic_stats(
|
||||
bundle_source_path,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from django.db.models.signals import post_save
|
||||
|
||||
from documents.file_moves import move_files_for_document
|
||||
from documents.management.commands.base import PaperlessCommand
|
||||
from documents.models import Document
|
||||
|
||||
@@ -11,5 +10,9 @@ class Command(PaperlessCommand):
|
||||
supports_multiprocessing = False
|
||||
|
||||
def handle(self, *args, **options):
|
||||
for document in self.track(Document.objects.all(), description="Renaming..."):
|
||||
post_save.send(Document, instance=document, created=False)
|
||||
for document in self.track(
|
||||
# move_files_for_document handles a root's versions itself
|
||||
Document.objects.filter(root_document__isnull=True).only("pk"),
|
||||
description="Renaming...",
|
||||
):
|
||||
move_files_for_document(document.pk)
|
||||
@@ -9,6 +9,7 @@ from rich.table import Table
|
||||
from rich.text import Text
|
||||
|
||||
from documents.classifier import load_classifier
|
||||
from documents.file_moves import defer_file_moves
|
||||
from documents.management.commands.base import PaperlessCommand
|
||||
from documents.models import Document
|
||||
from documents.signals.handlers import set_correspondent
|
||||
@@ -273,61 +274,63 @@ class Command(PaperlessCommand):
|
||||
description="Retagging...",
|
||||
stats_renderer=render_stats,
|
||||
):
|
||||
suggestion = DocumentSuggestion(document=document)
|
||||
# One file move per document, after all of its assignments.
|
||||
with defer_file_moves():
|
||||
suggestion = DocumentSuggestion(document=document)
|
||||
|
||||
if do_correspondent:
|
||||
correspondent = set_correspondent(
|
||||
None,
|
||||
document,
|
||||
classifier=classifier,
|
||||
replace=overwrite,
|
||||
use_first=use_first,
|
||||
dry_run=suggest,
|
||||
)
|
||||
if correspondent is not None:
|
||||
stats.correspondents += 1
|
||||
suggestion.correspondent = correspondent
|
||||
if do_correspondent:
|
||||
correspondent = set_correspondent(
|
||||
None,
|
||||
document,
|
||||
classifier=classifier,
|
||||
replace=overwrite,
|
||||
use_first=use_first,
|
||||
dry_run=suggest,
|
||||
)
|
||||
if correspondent is not None:
|
||||
stats.correspondents += 1
|
||||
suggestion.correspondent = correspondent
|
||||
|
||||
if do_document_type:
|
||||
document_type = set_document_type(
|
||||
None,
|
||||
document,
|
||||
classifier=classifier,
|
||||
replace=overwrite,
|
||||
use_first=use_first,
|
||||
dry_run=suggest,
|
||||
)
|
||||
if document_type is not None:
|
||||
stats.document_types += 1
|
||||
suggestion.document_type = document_type
|
||||
if do_document_type:
|
||||
document_type = set_document_type(
|
||||
None,
|
||||
document,
|
||||
classifier=classifier,
|
||||
replace=overwrite,
|
||||
use_first=use_first,
|
||||
dry_run=suggest,
|
||||
)
|
||||
if document_type is not None:
|
||||
stats.document_types += 1
|
||||
suggestion.document_type = document_type
|
||||
|
||||
if do_tags:
|
||||
tags_to_add, tags_to_remove = set_tags(
|
||||
None,
|
||||
document,
|
||||
classifier=classifier,
|
||||
replace=overwrite,
|
||||
dry_run=suggest,
|
||||
)
|
||||
stats.tags_added += len(tags_to_add)
|
||||
stats.tags_removed += len(tags_to_remove)
|
||||
suggestion.tags_to_add = frozenset(tags_to_add)
|
||||
suggestion.tags_to_remove = frozenset(tags_to_remove)
|
||||
if do_tags:
|
||||
tags_to_add, tags_to_remove = set_tags(
|
||||
None,
|
||||
document,
|
||||
classifier=classifier,
|
||||
replace=overwrite,
|
||||
dry_run=suggest,
|
||||
)
|
||||
stats.tags_added += len(tags_to_add)
|
||||
stats.tags_removed += len(tags_to_remove)
|
||||
suggestion.tags_to_add = frozenset(tags_to_add)
|
||||
suggestion.tags_to_remove = frozenset(tags_to_remove)
|
||||
|
||||
if do_storage_path:
|
||||
storage_path = set_storage_path(
|
||||
None,
|
||||
document,
|
||||
classifier=classifier,
|
||||
replace=overwrite,
|
||||
use_first=use_first,
|
||||
dry_run=suggest,
|
||||
)
|
||||
if storage_path is not None:
|
||||
stats.storage_paths += 1
|
||||
suggestion.storage_path = storage_path
|
||||
if do_storage_path:
|
||||
storage_path = set_storage_path(
|
||||
None,
|
||||
document,
|
||||
classifier=classifier,
|
||||
replace=overwrite,
|
||||
use_first=use_first,
|
||||
dry_run=suggest,
|
||||
)
|
||||
if storage_path is not None:
|
||||
stats.storage_paths += 1
|
||||
suggestion.storage_path = storage_path
|
||||
|
||||
stats.documents_processed += 1
|
||||
stats.documents_processed += 1
|
||||
|
||||
if suggest:
|
||||
suggestions.append(suggestion)
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
"""
|
||||
The global media lock, reentrant within a thread.
|
||||
|
||||
Code that both needs media.lock and opens a transaction that locks document
|
||||
rows must take media.lock first, so no transaction ever waits on it while
|
||||
holding rows. Reentrancy lets code already holding the lock (for example the
|
||||
consumer) call into code that takes it again (for example a workflow email
|
||||
action attaching files) without blocking itself.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from django.conf import settings
|
||||
from filelock import FileLock
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Iterator
|
||||
|
||||
|
||||
@contextmanager
|
||||
def media_lock(timeout: float = -1) -> Iterator[None]:
|
||||
"""
|
||||
Hold settings.MEDIA_LOCK for the block.
|
||||
|
||||
is_singleton returns one FileLock instance per path in this process, and
|
||||
the default thread_local=True keeps the hold count per thread, so the
|
||||
same thread re-enters while other threads and processes are excluded.
|
||||
The timeout goes to acquire() because a singleton rejects construction
|
||||
with different parameters. A negative timeout waits forever.
|
||||
"""
|
||||
lock = FileLock(settings.MEDIA_LOCK, is_singleton=True)
|
||||
with lock.acquire(timeout=timeout):
|
||||
yield
|
||||
@@ -2,6 +2,7 @@ import datetime
|
||||
import uuid
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import Any
|
||||
from typing import Final
|
||||
|
||||
import pathvalidate
|
||||
@@ -211,6 +212,12 @@ class StoragePath(MatchingModel):
|
||||
|
||||
class Document(SoftDeleteModel, ModelWithOwner): # type: ignore[django-manager-missing]
|
||||
MAX_STORED_FILENAME_LENGTH: Final[int] = 1024
|
||||
# Written only by the file mover, the consumer's file placement and the
|
||||
# archiver. A full save() of a stale instance must never write them, or
|
||||
# the DB can point at a path the file has already been moved away from.
|
||||
FILE_PATH_FIELDS: Final[frozenset[str]] = frozenset(
|
||||
{"filename", "archive_filename"},
|
||||
)
|
||||
# Per-component limit of common filesystems (ext4, XFS, btrfs, ZFS, APFS)
|
||||
MAX_PUBLIC_FILENAME_BYTES: Final[int] = 255
|
||||
|
||||
@@ -422,6 +429,31 @@ class Document(SoftDeleteModel, ModelWithOwner): # type: ignore[django-manager-
|
||||
res += f" {self.title}"
|
||||
return res
|
||||
|
||||
def save(self, *, write_file_paths: bool = False, **kwargs: Any) -> None:
|
||||
"""
|
||||
Save the document without writing filename / archive_filename on an
|
||||
existing row, unless write_file_paths=True or update_fields names them.
|
||||
|
||||
This mirrors how Django narrows a save on a deferred instance: only the
|
||||
loaded, concrete, non-generated, non-primary-key fields are written.
|
||||
"""
|
||||
if (
|
||||
not write_file_paths
|
||||
and not self._state.adding
|
||||
and kwargs.get("update_fields") is None
|
||||
and not kwargs.get("force_insert", False)
|
||||
):
|
||||
deferred = self.get_deferred_fields()
|
||||
kwargs["update_fields"] = [
|
||||
field.attname
|
||||
for field in self._meta.concrete_fields
|
||||
if not field.primary_key
|
||||
and not field.generated
|
||||
and field.name not in self.FILE_PATH_FIELDS
|
||||
and field.attname not in deferred
|
||||
]
|
||||
super().save(**kwargs)
|
||||
|
||||
def get_effective_barcodes(self) -> list["DocumentBarcode"]:
|
||||
"""
|
||||
Returns the stored barcodes for the document, like
|
||||
|
||||
@@ -99,14 +99,15 @@ def build_pdfs(
|
||||
f"{page_count} pages",
|
||||
)
|
||||
for specs, make_dst in outputs:
|
||||
with pikepdf.new() as dst:
|
||||
for spec in specs:
|
||||
dst.pages.append(source.pages[spec.page - 1])
|
||||
if spec.rotate:
|
||||
dst.pages[-1].rotate(spec.rotate, relative=True)
|
||||
dst.remove_unreferenced_resources()
|
||||
path = make_dst()
|
||||
dst.save(path)
|
||||
dst = pikepdf.new()
|
||||
for spec in specs:
|
||||
dst.pages.append(source.pages[spec.page - 1])
|
||||
if spec.rotate:
|
||||
dst.pages[-1].rotate(spec.rotate, relative=True)
|
||||
dst.remove_unreferenced_resources()
|
||||
path = make_dst()
|
||||
dst.save(path)
|
||||
dst.close()
|
||||
written.append(path)
|
||||
return written
|
||||
|
||||
|
||||
@@ -21,25 +21,22 @@ from channels.layers import get_channel_layer
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import Group
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import DatabaseError
|
||||
from django.db import close_old_connections
|
||||
from django.db import connections
|
||||
from django.db import models
|
||||
from django.db.models import Q
|
||||
from django.dispatch import receiver
|
||||
from django.utils import timezone
|
||||
from filelock import FileLock
|
||||
from rest_framework import serializers
|
||||
|
||||
from documents import matching
|
||||
from documents.caching import clear_document_caches
|
||||
from documents.caching import invalidate_llm_suggestions_cache
|
||||
from documents.caching import invalidate_suggestions_cache
|
||||
from documents.data_models import ConsumableDocument
|
||||
from documents.file_handling import create_source_path_directory
|
||||
from documents.file_handling import delete_empty_directories
|
||||
from documents.file_handling import generate_filename
|
||||
from documents.file_handling import generate_unique_filename
|
||||
from documents.file_moves import move_files_for_document
|
||||
from documents.file_moves import request_file_move
|
||||
from documents.media_lock import media_lock
|
||||
from documents.models import Correspondent
|
||||
from documents.models import CustomField
|
||||
from documents.models import CustomFieldInstance
|
||||
@@ -59,7 +56,6 @@ from documents.models import WorkflowTrigger
|
||||
from documents.permissions import restrict_queryset_to_visible
|
||||
from documents.plugins.helpers import DocumentsStatusManager
|
||||
from documents.templating.utils import convert_format_str_to_template_format
|
||||
from documents.utils import compute_checksum
|
||||
from documents.utils import copy_file_with_basic_stats
|
||||
from documents.workflows.actions import build_workflow_action_context
|
||||
from documents.workflows.actions import execute_email_action
|
||||
@@ -343,7 +339,7 @@ def set_storage_path(
|
||||
|
||||
# see empty_trash in documents/tasks.py for signal handling
|
||||
def cleanup_document_deletion(sender, instance, **kwargs) -> None:
|
||||
with FileLock(settings.MEDIA_LOCK):
|
||||
with media_lock():
|
||||
if settings.EMPTY_TRASH_DIR:
|
||||
# Find a non-conflicting filename in case a document with the same
|
||||
# name was moved to trash earlier
|
||||
@@ -409,17 +405,6 @@ def cleanup_document_deletion(sender, instance, **kwargs) -> None:
|
||||
)
|
||||
|
||||
|
||||
class CannotMoveFilesException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def _path_matches_checksum(path: Path, checksum: str | None) -> bool:
|
||||
if checksum is None or not path.is_file():
|
||||
return False
|
||||
|
||||
return compute_checksum(path) == checksum
|
||||
|
||||
|
||||
def _filename_template_uses_custom_fields(doc: Document) -> bool:
|
||||
template = None
|
||||
if doc.storage_path is not None:
|
||||
@@ -442,235 +427,37 @@ def update_filename_and_move_files(
|
||||
instance: Document | CustomFieldInstance,
|
||||
**kwargs,
|
||||
) -> None:
|
||||
action = kwargs.get("action")
|
||||
|
||||
if kwargs.get("reverse") and action == "pre_clear":
|
||||
# tag.documents.clear(): Django sends pk_set=None for both clear
|
||||
# actions, and the rows are gone by post_clear. Remember the affected
|
||||
# documents here, on the instance both signals share.
|
||||
instance._cleared_document_pks = list(
|
||||
instance.documents.values_list("pk", flat=True),
|
||||
)
|
||||
return
|
||||
|
||||
if action is not None and action not in {"post_add", "post_remove", "post_clear"}:
|
||||
# m2m_changed fires pre_* and post_* actions; only post_* describe the
|
||||
# relation state the filename should follow.
|
||||
return
|
||||
|
||||
if kwargs.get("reverse"):
|
||||
# tag.documents.add(doc): instance is the Tag, pk_set holds Document pks.
|
||||
pk_set = kwargs.get("pk_set")
|
||||
if action == "post_clear":
|
||||
pk_set = instance.__dict__.pop("_cleared_document_pks", ())
|
||||
for document in Document.objects.filter(pk__in=pk_set or ()):
|
||||
request_file_move(document)
|
||||
return
|
||||
|
||||
if isinstance(instance, CustomFieldInstance):
|
||||
if not _filename_template_uses_custom_fields(instance.document):
|
||||
return
|
||||
instance = instance.document
|
||||
|
||||
def validate_move(instance, old_path: Path, new_path: Path, root: Path) -> None:
|
||||
if not new_path.is_relative_to(root):
|
||||
msg = (
|
||||
f"Document {instance!s}: Refusing to move file outside root {root}: "
|
||||
f"{new_path}."
|
||||
)
|
||||
logger.warning(msg)
|
||||
raise CannotMoveFilesException(msg)
|
||||
|
||||
if not old_path.is_file():
|
||||
# Can't do anything if the old file does not exist anymore.
|
||||
msg = f"Document {instance!s}: File {old_path} doesn't exist."
|
||||
logger.fatal(msg)
|
||||
raise CannotMoveFilesException(msg)
|
||||
|
||||
if new_path.is_file():
|
||||
# Can't do anything if the new file already exists. Skip updating file.
|
||||
msg = f"Document {instance!s}: Cannot rename file since target path {new_path} already exists."
|
||||
logger.warning(msg)
|
||||
raise CannotMoveFilesException(msg)
|
||||
|
||||
if not instance.filename:
|
||||
# Can't update the filename if there is no filename to begin with
|
||||
# This happens when the consumer creates a new document.
|
||||
# The document is modified and saved multiple times, and only after
|
||||
# everything is done (i.e., the generated filename is final),
|
||||
# filename will be set to the location where the consumer has put
|
||||
# the file.
|
||||
#
|
||||
# This will in turn cause this logic to move the file where it belongs.
|
||||
return
|
||||
|
||||
with FileLock(settings.MEDIA_LOCK):
|
||||
# If this was waiting for the lock, the filename or archive_filename
|
||||
# of this document may have been updated. This happens if multiple updates
|
||||
# get queued from the UI for the same document
|
||||
# So freshen up the data before doing anything
|
||||
instance.refresh_from_db()
|
||||
|
||||
try:
|
||||
old_filename = instance.filename
|
||||
old_source_path = instance.source_path
|
||||
move_original = False
|
||||
original_already_moved = False
|
||||
|
||||
old_archive_filename = instance.archive_filename
|
||||
old_archive_path = instance.archive_path
|
||||
move_archive = False
|
||||
archive_already_moved = False
|
||||
|
||||
candidate_filename = generate_filename(instance)
|
||||
if len(str(candidate_filename)) > Document.MAX_STORED_FILENAME_LENGTH:
|
||||
msg = (
|
||||
f"Document {instance!s}: Generated filename exceeds db path "
|
||||
f"limit ({len(str(candidate_filename))} > "
|
||||
f"{Document.MAX_STORED_FILENAME_LENGTH}): {candidate_filename!s}"
|
||||
)
|
||||
logger.warning(msg)
|
||||
raise CannotMoveFilesException(msg)
|
||||
|
||||
candidate_source_path = (
|
||||
settings.ORIGINALS_DIR / candidate_filename
|
||||
).resolve()
|
||||
if candidate_filename == Path(old_filename):
|
||||
new_filename = Path(old_filename)
|
||||
elif (
|
||||
candidate_source_path.exists()
|
||||
and candidate_source_path != old_source_path
|
||||
):
|
||||
if not old_source_path.is_file() and _path_matches_checksum(
|
||||
candidate_source_path,
|
||||
instance.checksum,
|
||||
):
|
||||
new_filename = candidate_filename
|
||||
original_already_moved = True
|
||||
else:
|
||||
# Only fall back to unique search when there is an actual conflict
|
||||
new_filename = generate_unique_filename(instance)
|
||||
else:
|
||||
new_filename = candidate_filename
|
||||
|
||||
# Need to convert to string to be able to save it to the db
|
||||
instance.filename = str(new_filename)
|
||||
move_original = (
|
||||
old_filename != instance.filename and not original_already_moved
|
||||
)
|
||||
|
||||
if instance.has_archive_version:
|
||||
archive_candidate = generate_filename(instance, archive_filename=True)
|
||||
if len(str(archive_candidate)) > Document.MAX_STORED_FILENAME_LENGTH:
|
||||
msg = (
|
||||
f"Document {instance!s}: Generated archive filename exceeds "
|
||||
f"db path limit ({len(str(archive_candidate))} > "
|
||||
f"{Document.MAX_STORED_FILENAME_LENGTH}): {archive_candidate!s}"
|
||||
)
|
||||
logger.warning(msg)
|
||||
raise CannotMoveFilesException(msg)
|
||||
archive_candidate_path = (
|
||||
settings.ARCHIVE_DIR / archive_candidate
|
||||
).resolve()
|
||||
if archive_candidate == Path(old_archive_filename):
|
||||
new_archive_filename = Path(old_archive_filename)
|
||||
elif (
|
||||
archive_candidate_path.exists()
|
||||
and archive_candidate_path != old_archive_path
|
||||
):
|
||||
if not old_archive_path.is_file() and _path_matches_checksum(
|
||||
archive_candidate_path,
|
||||
instance.archive_checksum,
|
||||
):
|
||||
new_archive_filename = archive_candidate
|
||||
archive_already_moved = True
|
||||
else:
|
||||
new_archive_filename = generate_unique_filename(
|
||||
instance,
|
||||
archive_filename=True,
|
||||
)
|
||||
else:
|
||||
new_archive_filename = archive_candidate
|
||||
|
||||
instance.archive_filename = str(new_archive_filename)
|
||||
|
||||
move_archive = (
|
||||
old_archive_filename != instance.archive_filename
|
||||
and not archive_already_moved
|
||||
)
|
||||
else:
|
||||
move_archive = False
|
||||
|
||||
if not move_original and not move_archive:
|
||||
updates = {"modified": timezone.now()}
|
||||
if old_filename != instance.filename:
|
||||
updates["filename"] = instance.filename
|
||||
if old_archive_filename != instance.archive_filename:
|
||||
updates["archive_filename"] = instance.archive_filename
|
||||
|
||||
# Don't save() here to prevent infinite recursion.
|
||||
Document.objects.filter(pk=instance.pk).update(**updates)
|
||||
return
|
||||
|
||||
if move_original:
|
||||
validate_move(
|
||||
instance,
|
||||
old_source_path,
|
||||
instance.source_path,
|
||||
settings.ORIGINALS_DIR,
|
||||
)
|
||||
create_source_path_directory(instance.source_path)
|
||||
shutil.move(old_source_path, instance.source_path)
|
||||
|
||||
if move_archive:
|
||||
validate_move(
|
||||
instance,
|
||||
old_archive_path,
|
||||
instance.archive_path,
|
||||
settings.ARCHIVE_DIR,
|
||||
)
|
||||
create_source_path_directory(instance.archive_path)
|
||||
shutil.move(old_archive_path, instance.archive_path)
|
||||
|
||||
# Don't save() here to prevent infinite recursion.
|
||||
Document.global_objects.filter(pk=instance.pk).update(
|
||||
filename=instance.filename,
|
||||
archive_filename=instance.archive_filename,
|
||||
modified=timezone.now(),
|
||||
)
|
||||
# Clear any caching for this document. Slightly overkill, but not terrible
|
||||
clear_document_caches(instance.pk)
|
||||
|
||||
except (OSError, DatabaseError, CannotMoveFilesException) as e:
|
||||
logger.warning(f"Exception during file handling: {e}")
|
||||
# This happens when either:
|
||||
# - moving the files failed due to file system errors
|
||||
# - saving to the database failed due to database errors
|
||||
# In both cases, we need to revert to the original state.
|
||||
|
||||
# Try to move files to their original location.
|
||||
try:
|
||||
if move_original and instance.source_path.is_file():
|
||||
logger.info("Restoring previous original path")
|
||||
shutil.move(instance.source_path, old_source_path)
|
||||
|
||||
if move_archive and instance.archive_path.is_file():
|
||||
logger.info("Restoring previous archive path")
|
||||
shutil.move(instance.archive_path, old_archive_path)
|
||||
|
||||
except Exception:
|
||||
# This is fine, since:
|
||||
# A: if we managed to move source from A to B, we will also
|
||||
# manage to move it from B to A. If not, we have a serious
|
||||
# issue that's going to get caught by the santiy checker.
|
||||
# All files remain in place and will never be overwritten,
|
||||
# so this is not the end of the world.
|
||||
# B: if moving the original file failed, nothing has changed
|
||||
# anyway.
|
||||
pass
|
||||
|
||||
# restore old values on the instance
|
||||
instance.filename = old_filename
|
||||
instance.archive_filename = old_archive_filename
|
||||
|
||||
# finally, remove any empty sub folders. This will do nothing if
|
||||
# something has failed above.
|
||||
if not old_source_path.is_file():
|
||||
delete_empty_directories(
|
||||
Path(old_source_path).parent,
|
||||
root=settings.ORIGINALS_DIR,
|
||||
)
|
||||
|
||||
if instance.has_archive_version and not old_archive_path.is_file():
|
||||
delete_empty_directories(
|
||||
Path(old_archive_path).parent,
|
||||
root=settings.ARCHIVE_DIR,
|
||||
)
|
||||
|
||||
# Keep version files in sync with root
|
||||
if instance.root_document_id is None:
|
||||
for version_doc in Document.objects.filter(root_document_id=instance.pk).only(
|
||||
"pk",
|
||||
):
|
||||
update_filename_and_move_files(
|
||||
Document,
|
||||
version_doc,
|
||||
)
|
||||
request_file_move(instance)
|
||||
|
||||
|
||||
@shared_task
|
||||
@@ -695,7 +482,8 @@ def process_cf_select_update(custom_field: CustomField) -> None:
|
||||
|
||||
for cf_instance in custom_field.fields.select_related("document").iterator():
|
||||
# Update the filename and move files if necessary
|
||||
update_filename_and_move_files(CustomFieldInstance, cf_instance)
|
||||
if _filename_template_uses_custom_fields(cf_instance.document):
|
||||
move_files_for_document(cf_instance.document_id)
|
||||
|
||||
|
||||
# should be disabled in /src/documents/management/commands/document_importer.py handle
|
||||
|
||||
+49
-9
@@ -17,7 +17,6 @@ from django.db import models
|
||||
from django.db import transaction
|
||||
from django.db.models.signals import post_save
|
||||
from django.utils import timezone
|
||||
from filelock import FileLock
|
||||
|
||||
from documents import sanity_checker
|
||||
from documents.barcodes import BarcodePlugin
|
||||
@@ -43,6 +42,7 @@ from documents.double_sided import CollatePlugin
|
||||
from documents.file_handling import create_source_path_directory
|
||||
from documents.file_handling import generate_unique_filename
|
||||
from documents.matching import prefilter_documents_by_workflowtrigger
|
||||
from documents.media_lock import media_lock
|
||||
from documents.models import Correspondent
|
||||
from documents.models import CustomFieldInstance
|
||||
from documents.models import Document
|
||||
@@ -312,9 +312,14 @@ def sanity_check(*, raise_on_error: bool = True) -> str:
|
||||
|
||||
@shared_task
|
||||
def bulk_update_documents(document_ids) -> None:
|
||||
from documents.file_moves import flush_pending_file_moves
|
||||
from documents.search import get_backend
|
||||
|
||||
document_ids = list(document_ids)
|
||||
# Bulk edits write through querysets and relation tables, which skip
|
||||
# auto_now, and the file mover only writes when a path changes. Record the
|
||||
# edit here, before the signals and notifications below read the documents.
|
||||
Document.objects.filter(id__in=document_ids).update(modified=timezone.now())
|
||||
# Annotated so the signal handlers below (e.g. matching) don't query the
|
||||
# versions of each document. Indexing re-queries and re-annotates its own
|
||||
# copy via add_or_update_ids() below, after these signals (and any
|
||||
@@ -325,13 +330,32 @@ def bulk_update_documents(document_ids) -> None:
|
||||
|
||||
for doc in documents:
|
||||
clear_document_caches(doc.pk)
|
||||
# The bulk edit wrote through querysets and relation tables, so this
|
||||
# post_save is what requests the move. Move before document_updated,
|
||||
# whose websocket notification must carry the final filename and
|
||||
# modified timestamp.
|
||||
post_save.send(Document, instance=doc, created=False)
|
||||
flush_pending_file_moves()
|
||||
# The move changed the stored paths. Workflows read source_path from
|
||||
# this instance, so bring it up to date. Not refresh_from_db(), which
|
||||
# would drop the effective content annotation.
|
||||
paths = (
|
||||
Document.global_objects.filter(pk=doc.pk)
|
||||
.values_list("filename", "archive_filename")
|
||||
.first()
|
||||
)
|
||||
if paths is not None:
|
||||
doc.filename, doc.archive_filename = paths
|
||||
document_updated.send(
|
||||
sender=None,
|
||||
document=doc,
|
||||
logging_group=uuid.uuid4(),
|
||||
skip_ai_index=True, # bulk path calls update_llm_index once below
|
||||
)
|
||||
post_save.send(Document, instance=doc, created=False)
|
||||
# Moves requested by workflows that document_updated ran. Moving per
|
||||
# document, rather than at the end of the task, keeps a long bulk
|
||||
# edit making steady progress.
|
||||
flush_pending_file_moves()
|
||||
|
||||
with get_backend().batch_update() as batch:
|
||||
batch.add_or_update_ids(document_ids)
|
||||
@@ -419,7 +443,13 @@ def update_document_content_maybe_archive_file(
|
||||
|
||||
thumbnail = parser.get_thumbnail(document.source_path, mime_type)
|
||||
|
||||
with transaction.atomic():
|
||||
# media.lock first, then the transaction: never wait on media.lock
|
||||
# while this transaction holds the document row. Also keeps the
|
||||
# unique archive filename generation under the lock.
|
||||
with media_lock(), transaction.atomic():
|
||||
# Loaded before the (long) parse; read current metadata now
|
||||
# that the lock is held, for the archive filename.
|
||||
document.refresh_from_db()
|
||||
oldDocument = Document.objects.get(pk=document.pk)
|
||||
if parser.get_archive_path():
|
||||
checksum = compute_checksum(parser.get_archive_path())
|
||||
@@ -484,11 +514,10 @@ def update_document_content_maybe_archive_file(
|
||||
modified=timezone.now(),
|
||||
)
|
||||
|
||||
with FileLock(settings.MEDIA_LOCK):
|
||||
if parser.get_archive_path():
|
||||
create_source_path_directory(document.archive_path)
|
||||
shutil.move(parser.get_archive_path(), document.archive_path)
|
||||
shutil.move(thumbnail, document.thumbnail_path)
|
||||
if parser.get_archive_path():
|
||||
create_source_path_directory(document.archive_path)
|
||||
shutil.move(parser.get_archive_path(), document.archive_path)
|
||||
shutil.move(thumbnail, document.thumbnail_path)
|
||||
|
||||
document.refresh_from_db()
|
||||
logger.info(
|
||||
@@ -533,7 +562,11 @@ def empty_trash(doc_ids=None) -> None:
|
||||
deleted_document_ids = list(documents.values_list("id", flat=True))
|
||||
# Temporarily connect the cleanup handler
|
||||
models.signals.post_delete.connect(cleanup_document_deletion, sender=Document)
|
||||
documents.delete() # this is effectively a hard delete
|
||||
# media.lock before Django's delete transaction: post_delete runs
|
||||
# cleanup_document_deletion inside it while the rows are locked, and
|
||||
# that handler re-enters the lock instead of waiting.
|
||||
with media_lock():
|
||||
documents.delete() # this is effectively a hard delete
|
||||
logger.info(f"Deleted {len(deleted_document_ids)} documents from trash")
|
||||
|
||||
if settings.AUDIT_LOG_ENABLED:
|
||||
@@ -563,6 +596,8 @@ def check_scheduled_workflows() -> None:
|
||||
|
||||
Once a document satisfies this condition, and recurring/non-recurring constraints are met, the workflow is run.
|
||||
"""
|
||||
from documents.file_moves import flush_pending_file_moves
|
||||
|
||||
scheduled_workflows = get_workflows_for_trigger(
|
||||
WorkflowTrigger.WorkflowTriggerType.SCHEDULED,
|
||||
)
|
||||
@@ -685,6 +720,11 @@ def check_scheduled_workflows() -> None:
|
||||
workflow_to_run=workflow,
|
||||
document=document,
|
||||
)
|
||||
# Move this document's files now rather than at the end
|
||||
# of the task, so a long run makes steady progress and
|
||||
# the notification below carries the final filename and
|
||||
# modified timestamp.
|
||||
flush_pending_file_moves()
|
||||
# Scheduled workflows dont send document_updated signal, so send a websocket update here to ensure clients are updated
|
||||
send_websocket_document_updated(
|
||||
sender=None,
|
||||
|
||||
@@ -91,84 +91,6 @@ class TestDirectoryExportSink:
|
||||
writer.close()
|
||||
assert json.loads((target / "manifest.json").read_text()) == [{"pk": 1}]
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("existing", "unchanged"),
|
||||
[
|
||||
pytest.param(_dumps({"version": "x"}), True, id="identical"),
|
||||
pytest.param(_dumps({"version": "y"}), False, id="same-size-different"),
|
||||
],
|
||||
)
|
||||
def test_add_json_compare_json(
|
||||
self,
|
||||
tmp_path: Path,
|
||||
*,
|
||||
existing: str,
|
||||
unchanged: bool,
|
||||
) -> None:
|
||||
target: Path = tmp_path / "out"
|
||||
target.mkdir()
|
||||
(target / "metadata.json").write_text(existing)
|
||||
os.utime(target / "metadata.json", (1, 1))
|
||||
with DirectoryExportSink(
|
||||
target,
|
||||
compare_checksums=False,
|
||||
compare_json=True,
|
||||
delete=False,
|
||||
) as sink:
|
||||
sink.add_json({"version": "x"}, "metadata.json")
|
||||
assert json.loads((target / "metadata.json").read_text()) == (
|
||||
json.loads(existing) if unchanged else {"version": "x"}
|
||||
)
|
||||
# An unchanged file is not rewritten, so its mtime is left alone
|
||||
assert ((target / "metadata.json").stat().st_mtime == 1) is unchanged
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("existing", "unchanged"),
|
||||
[
|
||||
pytest.param([{"pk": 1}], True, id="identical"),
|
||||
pytest.param([{"pk": 2}], False, id="changed"),
|
||||
],
|
||||
)
|
||||
def test_stream_compare_json(
|
||||
self,
|
||||
tmp_path: Path,
|
||||
*,
|
||||
existing: list[dict],
|
||||
unchanged: bool,
|
||||
) -> None:
|
||||
target: Path = tmp_path / "out"
|
||||
target.mkdir()
|
||||
# Write the existing manifest the same way the sink does
|
||||
with DirectoryExportSink(
|
||||
target,
|
||||
compare_checksums=False,
|
||||
compare_json=False,
|
||||
delete=False,
|
||||
) as sink:
|
||||
with sink.stream("manifest.json") as handle:
|
||||
writer: StreamingManifestWriter = StreamingManifestWriter(handle)
|
||||
for record in existing:
|
||||
writer.write_record(record)
|
||||
writer.close()
|
||||
os.utime(target / "manifest.json", (1, 1))
|
||||
|
||||
with DirectoryExportSink(
|
||||
target,
|
||||
compare_checksums=False,
|
||||
compare_json=True,
|
||||
delete=False,
|
||||
) as sink:
|
||||
with sink.stream("manifest.json") as handle:
|
||||
writer = StreamingManifestWriter(handle)
|
||||
writer.write_record({"pk": 1})
|
||||
writer.close()
|
||||
|
||||
assert json.loads((target / "manifest.json").read_text()) == (
|
||||
existing if unchanged else [{"pk": 1}]
|
||||
)
|
||||
assert ((target / "manifest.json").stat().st_mtime == 1) is unchanged
|
||||
assert not (target / "manifest.json.tmp").exists()
|
||||
|
||||
def test_add_file_skips_when_size_and_mtime_match(
|
||||
self,
|
||||
tmp_path: Path,
|
||||
|
||||
@@ -743,7 +743,7 @@ class TestPDFActions(DirectoriesMixin, TestCase):
|
||||
mime_type="application/pdf",
|
||||
)
|
||||
self.doc1.archive_filename = sample1_archive
|
||||
self.doc1.save()
|
||||
self.doc1.save(write_file_paths=True)
|
||||
self.doc2 = Document.objects.create(
|
||||
checksum="B",
|
||||
title="B",
|
||||
@@ -753,7 +753,7 @@ class TestPDFActions(DirectoriesMixin, TestCase):
|
||||
created=date(2023, 1, 2),
|
||||
)
|
||||
self.doc2.archive_filename = sample2_archive
|
||||
self.doc2.save()
|
||||
self.doc2.save(write_file_paths=True)
|
||||
self.doc3 = Document.objects.create(
|
||||
checksum="C",
|
||||
title="C",
|
||||
@@ -778,7 +778,7 @@ class TestPDFActions(DirectoriesMixin, TestCase):
|
||||
created=date(2023, 1, 3),
|
||||
)
|
||||
self.img_doc.archive_filename = img_doc_archive
|
||||
self.img_doc.save()
|
||||
self.img_doc.save(write_file_paths=True)
|
||||
|
||||
@staticmethod
|
||||
def fake_decrypt(
|
||||
|
||||
@@ -27,6 +27,10 @@ from documents.models import Document
|
||||
from documents.models import DocumentType
|
||||
from documents.models import StoragePath
|
||||
from documents.models import Tag
|
||||
from documents.models import Workflow
|
||||
from documents.models import WorkflowAction
|
||||
from documents.models import WorkflowActionEmail
|
||||
from documents.models import WorkflowTrigger
|
||||
from documents.parsers import ParseError
|
||||
from documents.plugins.helpers import ProgressStatusOptions
|
||||
from documents.tasks import sanity_check
|
||||
@@ -38,6 +42,7 @@ from paperless_testing.factories import DocumentFactory
|
||||
from paperless_testing.factories import TagFactory
|
||||
from paperless_testing.factories import UserFactory
|
||||
from paperless_testing.fakes.progress import FakeProgressManager
|
||||
from paperless_testing.locks import record_media_lock_acquisitions
|
||||
from paperless_testing.permissions import grant_object
|
||||
from paperless_testing.samples import MULTI_PAGE_DIGITAL_PDF
|
||||
from paperless_testing.samples import MULTI_PAGE_IMAGES_PDF
|
||||
@@ -221,6 +226,160 @@ class TestConsumer(
|
||||
shutil.copy(src, dst)
|
||||
return dst
|
||||
|
||||
@mock.patch("documents.consumer.load_classifier")
|
||||
def test_consume_takes_media_lock_outside_transaction(self, m) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- A new document to consume
|
||||
WHEN:
|
||||
- It is consumed
|
||||
THEN:
|
||||
- media.lock is acquired
|
||||
- media.lock is never first acquired inside a transaction
|
||||
- The document's file is in place
|
||||
"""
|
||||
m.return_value = MagicMock()
|
||||
|
||||
with record_media_lock_acquisitions() as acquisitions:
|
||||
with self.get_consumer(self.get_test_file()) as consumer:
|
||||
consumer.run()
|
||||
|
||||
self.assertTrue(acquisitions)
|
||||
self.assertFalse(any(a.in_user_transaction for a in acquisitions))
|
||||
document = Document.objects.first()
|
||||
assert document is not None
|
||||
self.assertIsFile(document.source_path)
|
||||
|
||||
@mock.patch("documents.consumer.load_classifier")
|
||||
def test_consume_places_file_before_post_consume_script(self, m) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- A new document to consume
|
||||
WHEN:
|
||||
- It is consumed
|
||||
THEN:
|
||||
- Pending file moves are flushed before the post-consume script runs
|
||||
"""
|
||||
m.return_value = MagicMock()
|
||||
order = MagicMock()
|
||||
|
||||
with (
|
||||
mock.patch(
|
||||
"documents.consumer.flush_pending_file_moves",
|
||||
order.flush,
|
||||
),
|
||||
mock.patch.object(
|
||||
ConsumerPlugin,
|
||||
"run_post_consume_script",
|
||||
order.script,
|
||||
),
|
||||
):
|
||||
with self.get_consumer(self.get_test_file()) as consumer:
|
||||
consumer.run()
|
||||
|
||||
self.assertEqual(
|
||||
[c[0] for c in order.mock_calls],
|
||||
["flush", "script"],
|
||||
)
|
||||
|
||||
@mock.patch("documents.consumer.load_classifier")
|
||||
def test_consume_version_takes_media_lock_outside_transaction(self, m) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- An existing root document
|
||||
WHEN:
|
||||
- A new version of it is consumed (the root row is locked with
|
||||
select_for_update inside the consumer's transaction)
|
||||
THEN:
|
||||
- media.lock is never first acquired inside a transaction
|
||||
- The root's modified is bumped
|
||||
"""
|
||||
m.return_value = MagicMock()
|
||||
|
||||
with self.get_consumer(self.get_test_file()) as consumer:
|
||||
consumer.run()
|
||||
root_doc = Document.objects.first()
|
||||
assert root_doc is not None
|
||||
original_modified = timezone.now() - datetime.timedelta(days=1)
|
||||
Document.objects.filter(pk=root_doc.pk).update(modified=original_modified)
|
||||
|
||||
version_file = self.get_test_file2()
|
||||
status = FakeProgressManager(version_file.name, None)
|
||||
overrides = DocumentMetadataOverrides(version_label="v2")
|
||||
doc = ConsumableDocument(
|
||||
DocumentSource.ApiUpload,
|
||||
original_file=version_file,
|
||||
root_document_id=root_doc.pk,
|
||||
)
|
||||
preflight = ConsumerPreflightPlugin(
|
||||
doc,
|
||||
overrides,
|
||||
status, # type: ignore[arg-type]
|
||||
self.dirs.scratch_dir,
|
||||
"task-id",
|
||||
)
|
||||
preflight.setup()
|
||||
preflight.run()
|
||||
consumer = ConsumerPlugin(
|
||||
doc,
|
||||
overrides,
|
||||
status, # type: ignore[arg-type]
|
||||
self.dirs.scratch_dir,
|
||||
"task-id",
|
||||
)
|
||||
consumer.setup()
|
||||
|
||||
try:
|
||||
with record_media_lock_acquisitions() as acquisitions:
|
||||
consumer.run()
|
||||
finally:
|
||||
consumer.cleanup()
|
||||
|
||||
self.assertTrue(acquisitions)
|
||||
self.assertFalse(any(a.in_user_transaction for a in acquisitions))
|
||||
root_doc.refresh_from_db()
|
||||
self.assertGreater(root_doc.modified, original_modified)
|
||||
|
||||
@override_settings(
|
||||
PAPERLESS_EMAIL_HOST="localhost",
|
||||
EMAIL_ENABLED=True,
|
||||
PAPERLESS_URL="http://localhost:8000",
|
||||
)
|
||||
@mock.patch("documents.consumer.load_classifier")
|
||||
@mock.patch("django.core.mail.message.EmailMessage.send", return_value=1)
|
||||
def test_consumption_workflow_email_runs_under_held_lock(self, send, m) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- A document added workflow with an email action
|
||||
WHEN:
|
||||
- A document is consumed (the consumer holds media.lock while
|
||||
workflows run)
|
||||
THEN:
|
||||
- The email action re-enters media.lock and sends without blocking
|
||||
"""
|
||||
m.return_value = MagicMock()
|
||||
trigger = WorkflowTrigger.objects.create(
|
||||
type=WorkflowTrigger.WorkflowTriggerType.DOCUMENT_ADDED,
|
||||
)
|
||||
email = WorkflowActionEmail.objects.create(
|
||||
subject="added",
|
||||
body="body",
|
||||
to="someone@example.com",
|
||||
include_document=True,
|
||||
)
|
||||
action = WorkflowAction.objects.create(
|
||||
type=WorkflowAction.WorkflowActionType.EMAIL,
|
||||
email=email,
|
||||
)
|
||||
workflow = Workflow.objects.create(name="email on add")
|
||||
workflow.triggers.add(trigger)
|
||||
workflow.actions.add(action)
|
||||
|
||||
with self.get_consumer(self.get_test_file()) as consumer:
|
||||
consumer.run()
|
||||
|
||||
send.assert_called_once()
|
||||
|
||||
@override_settings(
|
||||
FILENAME_FORMAT=None,
|
||||
TIME_ZONE="America/Chicago",
|
||||
@@ -750,7 +909,7 @@ class TestConsumer(
|
||||
FILENAME_FORMAT="{correspondent}/{title}",
|
||||
ARCHIVE_FILE_GENERATION="always",
|
||||
)
|
||||
@mock.patch("documents.signals.handlers.generate_unique_filename")
|
||||
@mock.patch("documents.file_moves.generate_unique_filename")
|
||||
def testFilenameHandlingUnstableFormat(self, m) -> None:
|
||||
filenames = ["this", "that", "now this", "i cannot decide"]
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
# Ensure that filename is properly generated
|
||||
self.assertEqual(document.filename, Path("none/none.pdf"))
|
||||
|
||||
document.save()
|
||||
document.save(write_file_paths=True)
|
||||
|
||||
# test that creating dirs for the source_path creates the correct directory
|
||||
create_source_path_directory(document.source_path)
|
||||
@@ -190,7 +190,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
|
||||
# Set a correspondent and save the document
|
||||
document.correspondent = Correspondent.objects.get_or_create(name="test")[0]
|
||||
document.save()
|
||||
document.save(write_file_paths=True)
|
||||
|
||||
# Check proper handling of files
|
||||
self.assertIsFile(
|
||||
@@ -232,7 +232,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
disable_auditlog(),
|
||||
):
|
||||
m.side_effect = DatabaseError()
|
||||
document.save()
|
||||
document.save(write_file_paths=True)
|
||||
|
||||
# Check proper handling of files
|
||||
self.assertIsFile(document.source_path)
|
||||
@@ -336,7 +336,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
|
||||
# Ensure that filename is properly generated
|
||||
document.filename = generate_filename(document)
|
||||
document.save()
|
||||
document.save(write_file_paths=True)
|
||||
self.assertEqual(document.filename, "none/none.pdf")
|
||||
|
||||
create_source_path_directory(document.source_path)
|
||||
@@ -362,7 +362,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
|
||||
# Ensure that filename is properly generated
|
||||
document.filename = generate_filename(document)
|
||||
document.save()
|
||||
document.save(write_file_paths=True)
|
||||
self.assertEqual(document.filename, "none/none.pdf")
|
||||
|
||||
create_source_path_directory(document.source_path)
|
||||
@@ -385,7 +385,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
|
||||
document.save()
|
||||
document.filename = generate_filename(document)
|
||||
document.save()
|
||||
document.save(write_file_paths=True)
|
||||
create_source_path_directory(document.source_path)
|
||||
Path(document.source_path).touch()
|
||||
document.delete()
|
||||
@@ -421,7 +421,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
|
||||
# Set a correspondent and save the document
|
||||
document.correspondent = Correspondent.objects.get_or_create(name="test")[0]
|
||||
document.save()
|
||||
document.save(write_file_paths=True)
|
||||
|
||||
# Check proper handling of files
|
||||
self.assertIsDir(settings.ORIGINALS_DIR / "test")
|
||||
@@ -476,7 +476,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
def test_filename_relative(self) -> None:
|
||||
doc = Document.objects.create(title="doc1", mime_type="application/pdf")
|
||||
doc.filename = generate_filename(doc)
|
||||
doc.save()
|
||||
doc.save(write_file_paths=True)
|
||||
|
||||
self.assertEqual(
|
||||
doc.source_path,
|
||||
@@ -532,7 +532,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
|
||||
# Ensure that filename is properly generated
|
||||
document.filename = generate_filename(document)
|
||||
document.save()
|
||||
document.save(write_file_paths=True)
|
||||
self.assertEqual(document.filename, "none/none/none.pdf")
|
||||
create_source_path_directory(document.source_path)
|
||||
Path(document.source_path).touch()
|
||||
@@ -620,13 +620,13 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
Path(document.source_path).touch()
|
||||
Path(document2.source_path).touch()
|
||||
document.filename = "0000001.pdf"
|
||||
document.save()
|
||||
document.save(write_file_paths=True)
|
||||
|
||||
self.assertIsFile(document.source_path)
|
||||
self.assertEqual(document.filename, "qwe.pdf")
|
||||
|
||||
document2.filename = "0000002.pdf"
|
||||
document2.save()
|
||||
document2.save(write_file_paths=True)
|
||||
|
||||
self.assertIsFile(document.source_path)
|
||||
self.assertEqual(document2.filename, "qwe_01.pdf")
|
||||
@@ -656,19 +656,17 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
self.assertEqual(document2.filename, "qwe.pdf")
|
||||
|
||||
@override_settings(FILENAME_FORMAT="{title}")
|
||||
@mock.patch("documents.signals.handlers.Document.objects.filter")
|
||||
@mock.patch("documents.signals.handlers.shutil.move")
|
||||
@mock.patch("documents.file_moves.Document.global_objects.filter")
|
||||
@mock.patch("documents.file_moves.shutil.move")
|
||||
def test_no_move_only_save(self, mock_move, mock_filter) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- A document with a filename
|
||||
- The document is saved
|
||||
- The filename is not changed
|
||||
WHEN:
|
||||
- The document is saved
|
||||
- The document is saved without a change that affects its path
|
||||
THEN:
|
||||
- The document modified date is updated
|
||||
- The document is not moved
|
||||
- The document modified date is updated by the save itself
|
||||
- The file is not moved and the mover writes nothing
|
||||
"""
|
||||
with disable_auditlog():
|
||||
doc = Document.objects.create(
|
||||
@@ -686,7 +684,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
doc.save()
|
||||
doc.refresh_from_db()
|
||||
|
||||
mock_filter.assert_called()
|
||||
mock_filter.assert_not_called()
|
||||
self.assertNotEqual(original_modified, doc.modified)
|
||||
mock_move.assert_not_called()
|
||||
|
||||
@@ -694,7 +692,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
FILENAME_FORMAT="{{title}}_{{custom_fields|get_cf_value('test')}}",
|
||||
CELERY_TASK_ALWAYS_EAGER=True,
|
||||
)
|
||||
@mock.patch("documents.signals.handlers.update_filename_and_move_files")
|
||||
@mock.patch("documents.signals.handlers.move_files_for_document")
|
||||
def test_select_cf_updated(self, m) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
@@ -2045,7 +2043,7 @@ class TestCustomFieldFilenameUpdates(
|
||||
Path(self.doc.source_path).parent.mkdir(parents=True, exist_ok=True)
|
||||
Path(self.doc.source_path).touch()
|
||||
|
||||
with mock.patch("documents.signals.handlers.generate_unique_filename") as m:
|
||||
with mock.patch("documents.file_moves.generate_unique_filename") as m:
|
||||
m.side_effect = generate_unique_filename
|
||||
self.cfi.value_text = "updated"
|
||||
self.cfi.save()
|
||||
@@ -2067,7 +2065,7 @@ class TestCustomFieldFilenameUpdates(
|
||||
Path(self.doc.source_path).parent.mkdir(parents=True, exist_ok=True)
|
||||
Path(self.doc.source_path).touch()
|
||||
|
||||
with mock.patch("documents.signals.handlers.generate_unique_filename") as m:
|
||||
with mock.patch("documents.file_moves.generate_unique_filename") as m:
|
||||
m.side_effect = generate_unique_filename
|
||||
self.cfi.value_text = "updated"
|
||||
self.cfi.save()
|
||||
@@ -2145,7 +2143,7 @@ def test_refresh_failure_surfaces_database_error(
|
||||
GIVEN:
|
||||
- A document with a stored filename
|
||||
WHEN:
|
||||
- Saving it triggers a filename update and refreshing it from the database fails
|
||||
- Saving it triggers a filename update and loading it from the database fails
|
||||
THEN:
|
||||
- The database error is raised, not an unbound variable error from the rollback
|
||||
"""
|
||||
@@ -2153,8 +2151,8 @@ def test_refresh_failure_surfaces_database_error(
|
||||
|
||||
with (
|
||||
mock.patch.object(
|
||||
Document,
|
||||
"refresh_from_db",
|
||||
Document.global_objects,
|
||||
"get",
|
||||
side_effect=DatabaseError("database is locked"),
|
||||
),
|
||||
pytest.raises(DatabaseError, match="database is locked"),
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -18,11 +18,13 @@ if TYPE_CHECKING:
|
||||
from pytest_mock import MockerFixture
|
||||
|
||||
from documents.file_handling import generate_filename
|
||||
from documents.file_moves import move_files_for_document
|
||||
from documents.models import Document
|
||||
from documents.tasks import update_document_content_maybe_archive_file
|
||||
from paperless_testing.assertions import FileSystemAssertsMixin
|
||||
from paperless_testing.dirs import DirectoriesMixin
|
||||
from paperless_testing.factories import DocumentFactory
|
||||
from paperless_testing.locks import record_media_lock_acquisitions
|
||||
from paperless_testing.samples import SIMPLE_DIGITAL_PDF
|
||||
|
||||
sample_file: Path = SIMPLE_DIGITAL_PDF
|
||||
@@ -63,6 +65,28 @@ class TestArchiver(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
self.assertTrue(filecmp.cmp(sample_file, doc.source_path))
|
||||
self.assertEqual(doc.archive_filename, "none/A.pdf")
|
||||
|
||||
def test_handle_document_takes_media_lock_outside_transaction(self) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- A document whose archive version is being generated
|
||||
WHEN:
|
||||
- update_document_content_maybe_archive_file runs
|
||||
THEN:
|
||||
- media.lock is acquired
|
||||
- media.lock is never first acquired while a transaction holds the
|
||||
document row
|
||||
"""
|
||||
doc = self.make_models()
|
||||
shutil.copy(sample_file, Path(self.dirs.originals_dir) / f"{doc.id:07}.pdf")
|
||||
|
||||
with record_media_lock_acquisitions() as acquisitions:
|
||||
update_document_content_maybe_archive_file(doc.pk)
|
||||
|
||||
self.assertTrue(acquisitions)
|
||||
self.assertFalse(any(a.in_user_transaction for a in acquisitions))
|
||||
doc.refresh_from_db()
|
||||
self.assertIsFile(doc.archive_path)
|
||||
|
||||
def test_unknown_mime_type(self) -> None:
|
||||
doc = self.make_models()
|
||||
doc.mime_type = "sdgfh"
|
||||
@@ -236,7 +260,7 @@ class TestRenamer(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
doc = Document.objects.create(title="test", mime_type="image/jpeg")
|
||||
doc.filename = generate_filename(doc)
|
||||
doc.archive_filename = generate_filename(doc, archive_filename=True)
|
||||
doc.save()
|
||||
doc.save(write_file_paths=True)
|
||||
|
||||
Path(doc.source_path).touch()
|
||||
Path(doc.archive_path).touch()
|
||||
@@ -253,6 +277,42 @@ class TestRenamer(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
self.assertIsFile(doc2.source_path)
|
||||
self.assertIsFile(doc2.archive_path)
|
||||
|
||||
@override_settings(FILENAME_FORMAT="")
|
||||
def test_rename_moves_each_document_by_direct_call(self) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- Two documents whose filename format changed
|
||||
WHEN:
|
||||
- document_renamer runs
|
||||
THEN:
|
||||
- move_files_for_document is called once per document
|
||||
- Both files are at their new paths
|
||||
"""
|
||||
docs = []
|
||||
for title in ("first", "second"):
|
||||
doc = Document.objects.create(title=title, mime_type="image/jpeg")
|
||||
doc.filename = generate_filename(doc)
|
||||
doc.save(write_file_paths=True)
|
||||
Path(doc.source_path).touch()
|
||||
docs.append(doc)
|
||||
|
||||
with (
|
||||
override_settings(FILENAME_FORMAT="{title}"),
|
||||
mock.patch(
|
||||
"documents.management.commands.document_renamer.move_files_for_document",
|
||||
wraps=move_files_for_document,
|
||||
) as mover,
|
||||
):
|
||||
call_command("document_renamer", skip_checks=True)
|
||||
|
||||
self.assertCountEqual(
|
||||
[c.args[0] for c in mover.call_args_list],
|
||||
[d.pk for d in docs],
|
||||
)
|
||||
for doc in docs:
|
||||
doc.refresh_from_db()
|
||||
self.assertIsFile(doc.source_path)
|
||||
|
||||
|
||||
@pytest.mark.management
|
||||
class TestCreateClassifier:
|
||||
|
||||
@@ -4,10 +4,13 @@ Tests for the document_retagger management command.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import pytest
|
||||
from django.core.management import call_command
|
||||
from django.core.management.base import CommandError
|
||||
|
||||
from documents.file_moves import _active_collector
|
||||
from documents.models import Correspondent
|
||||
from documents.models import Document
|
||||
from documents.models import DocumentType
|
||||
@@ -21,6 +24,12 @@ from paperless_testing.factories import DocumentTypeFactory
|
||||
from paperless_testing.factories import StoragePathFactory
|
||||
from paperless_testing.factories import TagFactory
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from pytest_django.fixtures import Settings
|
||||
from pytest_mock import MockerFixture
|
||||
|
||||
from paperless_testing.dirs import PaperlessDirs
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Module-level type aliases
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -484,3 +493,69 @@ class TestRetaggerEdgeCases(DirectoriesMixin):
|
||||
|
||||
assert d_first.tags.count() == 0
|
||||
assert d_unrelated.tags.count() == 2
|
||||
|
||||
|
||||
@pytest.mark.management
|
||||
@pytest.mark.django_db
|
||||
class TestRetaggerFileMoves:
|
||||
def test_each_document_is_processed_in_its_own_scope(
|
||||
self,
|
||||
paperless_dirs: PaperlessDirs,
|
||||
settings: Settings,
|
||||
mocker: MockerFixture,
|
||||
) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- Two documents and a filename format using the correspondent
|
||||
- A classifier suggestion assigning a correspondent to each
|
||||
WHEN:
|
||||
- document_retagger runs with --correspondent
|
||||
THEN:
|
||||
- Each document is processed inside an open file move scope
|
||||
- When the second document is processed, the first one's file has
|
||||
already moved
|
||||
- Both files end at their final paths
|
||||
"""
|
||||
settings.FILENAME_FORMAT = "{correspondent}/{title}"
|
||||
(paperless_dirs.originals_dir / "none").mkdir(exist_ok=True)
|
||||
for title in ("first", "second"):
|
||||
(paperless_dirs.originals_dir / "none" / f"{title}.pdf").write_bytes(b"x")
|
||||
DocumentFactory(
|
||||
title=title,
|
||||
filename=f"none/{title}.pdf",
|
||||
mime_type="application/pdf",
|
||||
)
|
||||
correspondent = CorrespondentFactory(name="acme")
|
||||
processed: list[Document] = []
|
||||
scope_open: list[bool] = []
|
||||
seen_first_moved: list[bool] = []
|
||||
|
||||
def fake_set_correspondent(sender, document, **kwargs):
|
||||
scope_open.append(_active_collector.get() is not None)
|
||||
# Order-agnostic: on the second call, check the first one's file.
|
||||
if processed:
|
||||
first = processed[0]
|
||||
seen_first_moved.append(
|
||||
(
|
||||
paperless_dirs.originals_dir / "acme" / f"{first.title}.pdf"
|
||||
).is_file(),
|
||||
)
|
||||
processed.append(document)
|
||||
document.correspondent = correspondent
|
||||
document.save(update_fields=("correspondent",))
|
||||
return correspondent
|
||||
|
||||
mocker.patch(
|
||||
"documents.management.commands.document_retagger.load_classifier",
|
||||
)
|
||||
mocker.patch(
|
||||
"documents.management.commands.document_retagger.set_correspondent",
|
||||
side_effect=fake_set_correspondent,
|
||||
)
|
||||
|
||||
call_command("document_retagger", "--correspondent", skip_checks=True)
|
||||
|
||||
assert scope_open == [True, True]
|
||||
assert seen_first_moved == [True]
|
||||
for title in ("first", "second"):
|
||||
assert (paperless_dirs.originals_dir / "acme" / f"{title}.pdf").is_file()
|
||||
@@ -0,0 +1,121 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import threading
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import pytest
|
||||
from django.db import transaction
|
||||
from filelock import Timeout
|
||||
|
||||
from documents.file_moves import in_user_transaction
|
||||
from documents.media_lock import media_lock
|
||||
from paperless_testing.locks import record_media_lock_acquisitions
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from paperless_testing.dirs import PaperlessDirs
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("paperless_dirs")
|
||||
class TestMediaLock:
|
||||
def test_same_thread_reenters_without_blocking(self) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- media.lock held by the current thread
|
||||
WHEN:
|
||||
- The same thread acquires it again with a zero timeout
|
||||
THEN:
|
||||
- The nested acquisition succeeds immediately
|
||||
"""
|
||||
with media_lock(), media_lock(timeout=0):
|
||||
pass
|
||||
|
||||
def test_other_thread_is_excluded(self) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- media.lock held by the current thread
|
||||
WHEN:
|
||||
- Another thread tries to acquire it with a short timeout
|
||||
THEN:
|
||||
- The other thread times out
|
||||
- After release, the other thread can acquire it
|
||||
"""
|
||||
outcomes: list[str] = []
|
||||
|
||||
def try_acquire() -> None:
|
||||
try:
|
||||
with media_lock(timeout=0.2):
|
||||
outcomes.append("acquired")
|
||||
except Timeout:
|
||||
outcomes.append("timeout")
|
||||
|
||||
with media_lock():
|
||||
worker = threading.Thread(target=try_acquire)
|
||||
worker.start()
|
||||
worker.join()
|
||||
|
||||
worker = threading.Thread(target=try_acquire)
|
||||
worker.start()
|
||||
worker.join()
|
||||
|
||||
assert outcomes == ["timeout", "acquired"]
|
||||
|
||||
def test_lock_file_is_the_configured_path(
|
||||
self,
|
||||
paperless_dirs: PaperlessDirs,
|
||||
) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- The test's media directory layout
|
||||
WHEN:
|
||||
- media.lock is acquired
|
||||
THEN:
|
||||
- The lock file is created at settings.MEDIA_LOCK
|
||||
"""
|
||||
with media_lock():
|
||||
assert paperless_dirs.media_lock.exists()
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
class TestInUserTransaction:
|
||||
def test_false_inside_test_case_wrapper(self) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- The transaction pytest-django wraps around the test
|
||||
WHEN:
|
||||
- in_user_transaction is called
|
||||
THEN:
|
||||
- It returns False
|
||||
"""
|
||||
assert in_user_transaction() is False
|
||||
|
||||
def test_true_inside_atomic(self) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- An atomic block opened by code under test
|
||||
WHEN:
|
||||
- in_user_transaction is called inside it
|
||||
THEN:
|
||||
- It returns True
|
||||
"""
|
||||
with transaction.atomic():
|
||||
assert in_user_transaction() is True
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.usefixtures("paperless_dirs")
|
||||
class TestRecordMediaLockAcquisitions:
|
||||
def test_records_only_first_acquisitions(self) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- Nested media.lock acquisitions, the outer one inside a transaction
|
||||
WHEN:
|
||||
- They are recorded
|
||||
THEN:
|
||||
- Only the outer, first acquisition is recorded, flagged as inside
|
||||
a transaction
|
||||
"""
|
||||
with record_media_lock_acquisitions() as acquisitions:
|
||||
with transaction.atomic(), media_lock(), media_lock():
|
||||
pass
|
||||
|
||||
assert [a.in_user_transaction for a in acquisitions] == [True]
|
||||
@@ -1,4 +1,7 @@
|
||||
import pytest
|
||||
from django.db import DatabaseError
|
||||
from django.db import models
|
||||
from django.db import transaction
|
||||
|
||||
from documents.models import Correspondent
|
||||
from documents.models import Document
|
||||
@@ -22,3 +25,101 @@ class TestDocument:
|
||||
assert Correspondent.objects.count() == 0
|
||||
assert Document.objects.count() == 1
|
||||
assert Document.objects.first().correspondent is None
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.usefixtures("paperless_dirs")
|
||||
class TestDocumentFilePathWrites:
|
||||
def test_full_save_does_not_write_file_paths(self) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- A document whose filename columns were changed in the DB after
|
||||
an instance was loaded
|
||||
WHEN:
|
||||
- The stale instance is saved without update_fields
|
||||
THEN:
|
||||
- The DB filename columns keep the newer values
|
||||
- Other fields from the stale instance are written
|
||||
"""
|
||||
doc = DocumentFactory(filename="old.pdf", archive_filename="old.pdf")
|
||||
stale = Document.objects.get(pk=doc.pk)
|
||||
Document.objects.filter(pk=doc.pk).update(
|
||||
filename="new.pdf",
|
||||
archive_filename="new-archive.pdf",
|
||||
)
|
||||
|
||||
stale.title = "changed"
|
||||
stale.save()
|
||||
|
||||
doc.refresh_from_db()
|
||||
assert doc.filename == "new.pdf"
|
||||
assert doc.archive_filename == "new-archive.pdf"
|
||||
assert doc.title == "changed"
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"save_kwargs",
|
||||
[
|
||||
pytest.param({"write_file_paths": True}, id="write-file-paths"),
|
||||
pytest.param(
|
||||
{"update_fields": ["filename", "archive_filename"]},
|
||||
id="explicit-update-fields",
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_opt_in_writes_file_paths(self, save_kwargs: dict[str, object]) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- An existing document
|
||||
WHEN:
|
||||
- Its filename columns are changed in memory and saved with an
|
||||
explicit opt in
|
||||
THEN:
|
||||
- The DB filename columns are updated
|
||||
"""
|
||||
doc = DocumentFactory(filename="old.pdf", archive_filename="old.pdf")
|
||||
|
||||
doc.filename = "new.pdf"
|
||||
doc.archive_filename = "new.pdf"
|
||||
doc.save(**save_kwargs)
|
||||
|
||||
doc.refresh_from_db()
|
||||
assert doc.filename == "new.pdf"
|
||||
assert doc.archive_filename == "new.pdf"
|
||||
|
||||
def test_creation_writes_file_paths(self) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- A new, unsaved document with filename columns set
|
||||
WHEN:
|
||||
- It is saved
|
||||
THEN:
|
||||
- The filename columns are written
|
||||
"""
|
||||
doc = DocumentFactory.build(filename="a.pdf", archive_filename="b.pdf")
|
||||
|
||||
doc.save()
|
||||
|
||||
doc.refresh_from_db()
|
||||
assert doc.filename == "a.pdf"
|
||||
assert doc.archive_filename == "b.pdf"
|
||||
|
||||
def test_full_save_of_deleted_row_raises(self) -> None:
|
||||
"""
|
||||
GIVEN:
|
||||
- An instance whose row was hard-deleted elsewhere
|
||||
WHEN:
|
||||
- The instance is saved without update_fields
|
||||
THEN:
|
||||
- A DatabaseError is raised instead of re-inserting the row
|
||||
"""
|
||||
doc = DocumentFactory()
|
||||
stale = Document.objects.get(pk=doc.pk)
|
||||
# A plain QuerySet bypasses the soft-delete manager, so the row is
|
||||
# really gone (as after emptying the trash).
|
||||
models.QuerySet(model=Document).filter(pk=doc.pk).delete()
|
||||
|
||||
# The savepoint keeps the failed UPDATE from poisoning the test transaction.
|
||||
with pytest.raises(DatabaseError), transaction.atomic():
|
||||
stale.save()
|
||||
|
||||
assert not Document.global_objects.filter(pk=doc.pk).exists()
|
||||
@@ -129,7 +129,7 @@ class TestCheckSanityOriginal:
|
||||
class TestCheckSanityArchive:
|
||||
def test_checksum_without_filename(self, sample_doc: Document) -> None:
|
||||
sample_doc.archive_filename = None
|
||||
sample_doc.save()
|
||||
sample_doc.save(write_file_paths=True)
|
||||
messages = check_sanity()
|
||||
assert messages.has_error
|
||||
assert any(
|
||||
@@ -182,7 +182,7 @@ class TestCheckSanityArchive:
|
||||
Path(sample_doc.archive_path).unlink()
|
||||
sample_doc.archive_checksum = None
|
||||
sample_doc.archive_filename = None
|
||||
sample_doc.save()
|
||||
sample_doc.save(write_file_paths=True)
|
||||
messages = check_sanity()
|
||||
assert not messages.has_error
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ class ShareLinkBundleBuildTaskTests(DirectoriesMixin, APITestCase):
|
||||
def _write_document_file(self, *, archive: bool, content: bytes) -> Path:
|
||||
if archive:
|
||||
self.document.archive_filename = f"{self.document.pk:07}.pdf"
|
||||
self.document.save()
|
||||
self.document.save(write_file_paths=True)
|
||||
path = self.document.archive_path
|
||||
assert path is not None
|
||||
else:
|
||||
|
||||
@@ -887,8 +887,8 @@ class TestSavedZoneExtraction:
|
||||
WHEN:
|
||||
- Zone extraction runs
|
||||
THEN:
|
||||
- No on-commit callbacks are registered; finishing is left to the
|
||||
caller
|
||||
- The only on-commit callback is the deferred file move; reindexing
|
||||
and other finishing is left to the caller
|
||||
"""
|
||||
make_zone(template, "Title")
|
||||
mock_zone_ocr_run.return_value = subprocess.CompletedProcess(
|
||||
@@ -900,7 +900,10 @@ class TestSavedZoneExtraction:
|
||||
with django_capture_on_commit_callbacks() as callbacks:
|
||||
run_zone_extraction(document, templates=[template])
|
||||
|
||||
assert callbacks == []
|
||||
assert all(
|
||||
callback.__qualname__.startswith("request_file_move")
|
||||
for callback in callbacks
|
||||
)
|
||||
|
||||
def test_document_run_renders_each_page_once_across_templates(
|
||||
self,
|
||||
|
||||
@@ -24,32 +24,28 @@ def uri_validator(value: str, allowed_schemes: set[str] | None = None) -> None:
|
||||
parts = urlparse(value)
|
||||
if not parts.scheme:
|
||||
raise ValidationError(
|
||||
_("Unable to parse URI %(value)s, missing scheme"),
|
||||
_(f"Unable to parse URI {value}, missing scheme"),
|
||||
params={"value": value},
|
||||
)
|
||||
elif not parts.netloc and not parts.path:
|
||||
raise ValidationError(
|
||||
_("Unable to parse URI %(value)s, missing net location or path"),
|
||||
_(f"Unable to parse URI {value}, missing net location or path"),
|
||||
params={"value": value},
|
||||
)
|
||||
|
||||
if allowed_schemes and parts.scheme not in allowed_schemes:
|
||||
raise ValidationError(
|
||||
_(
|
||||
"URI scheme '%(scheme)s' is not allowed. Allowed schemes: %(allowed)s",
|
||||
f"URI scheme '{parts.scheme}' is not allowed. Allowed schemes: {', '.join(allowed_schemes)}",
|
||||
),
|
||||
params={
|
||||
"value": value,
|
||||
"scheme": parts.scheme,
|
||||
"allowed": ", ".join(sorted(allowed_schemes)),
|
||||
},
|
||||
params={"value": value, "scheme": parts.scheme},
|
||||
)
|
||||
|
||||
except ValidationError:
|
||||
raise
|
||||
except Exception as e:
|
||||
raise ValidationError(
|
||||
_("Unable to parse URI %(value)s"),
|
||||
_(f"Unable to parse URI {value}"),
|
||||
params={"value": value},
|
||||
) from e
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ from documents.data_models import ConsumableDocument
|
||||
from documents.data_models import DocumentMetadataOverrides
|
||||
from documents.data_models import DocumentSource
|
||||
from documents.file_handling import format_filename
|
||||
from documents.file_moves import flush_pending_file_moves
|
||||
from documents.filters import CorrespondentFilterSet
|
||||
from documents.filters import CustomFieldFilterSet
|
||||
from documents.filters import DocumentFilterSet
|
||||
@@ -1309,6 +1310,8 @@ class DocumentViewSet(
|
||||
)
|
||||
serializer.is_valid(raise_exception=True)
|
||||
self.perform_update(serializer)
|
||||
# The response must reflect the post-move filename and modified time
|
||||
flush_pending_file_moves()
|
||||
|
||||
if content_updated and content_doc.id != root_doc.id:
|
||||
content_doc.content = (
|
||||
|
||||
@@ -2,7 +2,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: paperless-ngx\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2026-11-27 02:54+0000\n"
|
||||
"POT-Creation-Date: 2026-11-26 22:28+0000\n"
|
||||
"PO-Revision-Date: 2022-02-17 04:17\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: English\n"
|
||||
@@ -2168,24 +2168,8 @@ msgstr ""
|
||||
msgid "As a final step, please complete the following form:"
|
||||
msgstr ""
|
||||
|
||||
#: documents/validators.py:27
|
||||
#, python-format
|
||||
msgid "Unable to parse URI %(value)s, missing scheme"
|
||||
msgstr ""
|
||||
|
||||
#: documents/validators.py:32
|
||||
#, python-format
|
||||
msgid "Unable to parse URI %(value)s, missing net location or path"
|
||||
msgstr ""
|
||||
|
||||
#: documents/validators.py:39
|
||||
#, python-format
|
||||
msgid "URI scheme '%(scheme)s' is not allowed. Allowed schemes: %(allowed)s"
|
||||
msgstr ""
|
||||
|
||||
#: documents/validators.py:52
|
||||
#, python-format
|
||||
msgid "Unable to parse URI %(value)s"
|
||||
msgid ", "
|
||||
msgstr ""
|
||||
|
||||
#: documents/views.py:327
|
||||
@@ -2513,151 +2497,151 @@ msgstr ""
|
||||
msgid "paperless application settings"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:595
|
||||
#: paperless/settings/__init__.py:588
|
||||
msgid "English (US)"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:596
|
||||
#: paperless/settings/__init__.py:589
|
||||
msgid "Arabic"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:597
|
||||
#: paperless/settings/__init__.py:590
|
||||
msgid "Afrikaans"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:598
|
||||
#: paperless/settings/__init__.py:591
|
||||
msgid "Belarusian"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:599
|
||||
#: paperless/settings/__init__.py:592
|
||||
msgid "Bulgarian"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:600
|
||||
#: paperless/settings/__init__.py:593
|
||||
msgid "Catalan"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:601
|
||||
#: paperless/settings/__init__.py:594
|
||||
msgid "Czech"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:602
|
||||
#: paperless/settings/__init__.py:595
|
||||
msgid "Danish"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:603
|
||||
#: paperless/settings/__init__.py:596
|
||||
msgid "German"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:604
|
||||
#: paperless/settings/__init__.py:597
|
||||
msgid "Greek"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:605
|
||||
#: paperless/settings/__init__.py:598
|
||||
msgid "English (GB)"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:606
|
||||
#: paperless/settings/__init__.py:599
|
||||
msgid "Spanish"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:607
|
||||
#: paperless/settings/__init__.py:600
|
||||
msgid "Persian"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:608
|
||||
#: paperless/settings/__init__.py:601
|
||||
msgid "Finnish"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:609
|
||||
#: paperless/settings/__init__.py:602
|
||||
msgid "French"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:610
|
||||
#: paperless/settings/__init__.py:603
|
||||
msgid "Hungarian"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:611
|
||||
#: paperless/settings/__init__.py:604
|
||||
msgid "Indonesian"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:612
|
||||
#: paperless/settings/__init__.py:605
|
||||
msgid "Italian"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:613
|
||||
#: paperless/settings/__init__.py:606
|
||||
msgid "Japanese"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:614
|
||||
#: paperless/settings/__init__.py:607
|
||||
msgid "Korean"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:615
|
||||
#: paperless/settings/__init__.py:608
|
||||
msgid "Luxembourgish"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:616
|
||||
#: paperless/settings/__init__.py:609
|
||||
msgid "Norwegian"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:617
|
||||
#: paperless/settings/__init__.py:610
|
||||
msgid "Dutch"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:618
|
||||
#: paperless/settings/__init__.py:611
|
||||
msgid "Polish"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:619
|
||||
#: paperless/settings/__init__.py:612
|
||||
msgid "Portuguese (Brazil)"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:620
|
||||
#: paperless/settings/__init__.py:613
|
||||
msgid "Portuguese"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:621
|
||||
#: paperless/settings/__init__.py:614
|
||||
msgid "Romanian"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:622
|
||||
#: paperless/settings/__init__.py:615
|
||||
msgid "Russian"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:623
|
||||
#: paperless/settings/__init__.py:616
|
||||
msgid "Slovak"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:624
|
||||
#: paperless/settings/__init__.py:617
|
||||
msgid "Slovenian"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:625
|
||||
#: paperless/settings/__init__.py:618
|
||||
msgid "Serbian"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:626
|
||||
#: paperless/settings/__init__.py:619
|
||||
msgid "Swedish"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:627
|
||||
#: paperless/settings/__init__.py:620
|
||||
msgid "Turkish"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:628
|
||||
#: paperless/settings/__init__.py:621
|
||||
msgid "Ukrainian"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:629
|
||||
#: paperless/settings/__init__.py:622
|
||||
msgid "Vietnamese"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:630
|
||||
#: paperless/settings/__init__.py:623
|
||||
msgid "Chinese Simplified"
|
||||
msgstr ""
|
||||
|
||||
#: paperless/settings/__init__.py:631
|
||||
#: paperless/settings/__init__.py:624
|
||||
msgid "Chinese Traditional"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+23
-1
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
|
||||
from celery import Celery
|
||||
from celery.contrib.django.task import DjangoTask
|
||||
from celery.signals import worker_process_init
|
||||
from kombu.serialization import register
|
||||
|
||||
@@ -26,7 +27,28 @@ register(
|
||||
content_encoding="binary",
|
||||
)
|
||||
|
||||
app = Celery("paperless")
|
||||
|
||||
class FileMoveScopedTask(DjangoTask):
|
||||
"""
|
||||
Run every task inside a document file move scope, so each document a task
|
||||
changes is moved once when the task ends, after its writes have committed.
|
||||
The scope also flushes when the task raises, for writes that committed
|
||||
before the failure.
|
||||
|
||||
Subclasses DjangoTask because a custom task_cls replaces the Django fixup's
|
||||
default, and delay_on_commit lives there.
|
||||
"""
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
# Function-local: this module is imported by paperless/__init__.py
|
||||
# before Django apps are loaded.
|
||||
from documents.file_moves import defer_file_moves
|
||||
|
||||
with defer_file_moves():
|
||||
return super().__call__(*args, **kwargs)
|
||||
|
||||
|
||||
app = Celery("paperless", task_cls=FileMoveScopedTask)
|
||||
|
||||
# Using a string here means the worker doesn't have to serialize
|
||||
# the configuration object to child processes.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from asgiref.sync import iscoroutinefunction
|
||||
from asgiref.sync import markcoroutinefunction
|
||||
from compression_middleware.middleware import CompressionMiddleware
|
||||
from django.conf import settings
|
||||
|
||||
@@ -30,3 +32,35 @@ class ApiVersionMiddleware:
|
||||
response["X-Version"] = version.__full_version_str__
|
||||
|
||||
return response
|
||||
|
||||
|
||||
class FileMoveMiddleware:
|
||||
"""
|
||||
Open a document file move scope around each request, so every document the
|
||||
request changes is moved once, after its writes have committed, before the
|
||||
response is returned.
|
||||
"""
|
||||
|
||||
sync_capable = True
|
||||
async_capable = True
|
||||
|
||||
def __init__(self, get_response) -> None:
|
||||
self.get_response = get_response
|
||||
self.async_mode = iscoroutinefunction(get_response)
|
||||
if self.async_mode:
|
||||
markcoroutinefunction(self)
|
||||
|
||||
def __call__(self, request):
|
||||
if self.async_mode:
|
||||
return self.__acall__(request)
|
||||
|
||||
from documents.file_moves import defer_file_moves
|
||||
|
||||
with defer_file_moves():
|
||||
return self.get_response(request)
|
||||
|
||||
async def __acall__(self, request):
|
||||
from documents.file_moves import adefer_file_moves
|
||||
|
||||
async with adefer_file_moves():
|
||||
return await self.get_response(request)
|
||||
@@ -566,7 +566,7 @@ class MailDocumentParser:
|
||||
# If no HTML content, create the PDF from the message.
|
||||
# Otherwise, create 2 PDFs and merge them with Gotenberg.
|
||||
if not mail_message.html:
|
||||
shutil.copyfile(mail_pdf_file, archive_path)
|
||||
archive_path.write_bytes(mail_pdf_file.read_bytes())
|
||||
else:
|
||||
pdf_of_html_content = self.generate_pdf_from_html(
|
||||
mail_message.html,
|
||||
|
||||
@@ -443,7 +443,7 @@ class RasterisedDocumentParser:
|
||||
self.log.warning(
|
||||
f"PDF/A metadata stamping failed ({e!s}); falling back to plain PDF.",
|
||||
)
|
||||
shutil.copyfile(plain_pdf_path, pdfa_path)
|
||||
pdfa_path.write_bytes(plain_pdf_path.read_bytes())
|
||||
|
||||
return pdfa_path
|
||||
|
||||
|
||||
@@ -296,8 +296,9 @@ class ApplicationConfigurationSerializer(
|
||||
return super().update(instance, validated_data)
|
||||
|
||||
def _sanitize_raster_image(self, file: UploadedFile) -> UploadedFile:
|
||||
with Image.open(file) as image:
|
||||
try:
|
||||
data = BytesIO()
|
||||
image = Image.open(file)
|
||||
image.save(data, format=image.format)
|
||||
data.seek(0)
|
||||
|
||||
@@ -309,6 +310,8 @@ class ApplicationConfigurationSerializer(
|
||||
size=data.getbuffer().nbytes,
|
||||
charset=getattr(file, "charset", None),
|
||||
)
|
||||
finally:
|
||||
image.close()
|
||||
|
||||
def validate_app_logo(self, file: UploadedFile):
|
||||
"""
|
||||
|
||||
@@ -188,6 +188,7 @@ if DEBUG:
|
||||
|
||||
MIDDLEWARE = [
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
"paperless.middleware.FileMoveMiddleware",
|
||||
"whitenoise.middleware.WhiteNoiseMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"corsheaders.middleware.CorsMiddleware",
|
||||
@@ -556,13 +557,6 @@ CSRF_COOKIE_NAME = f"{COOKIE_PREFIX}csrftoken"
|
||||
SESSION_COOKIE_NAME = f"{COOKIE_PREFIX}sessionid"
|
||||
LANGUAGE_COOKIE_NAME = f"{COOKIE_PREFIX}django_language"
|
||||
|
||||
# Mark the session, CSRF and language cookies as Secure, so browsers only send
|
||||
# them over HTTPS. Off by default, as it breaks any access over plain HTTP.
|
||||
COOKIE_SECURE = get_bool_from_env("PAPERLESS_COOKIE_SECURE", "false")
|
||||
SESSION_COOKIE_SECURE = COOKIE_SECURE
|
||||
CSRF_COOKIE_SECURE = COOKIE_SECURE
|
||||
LANGUAGE_COOKIE_SECURE = COOKIE_SECURE
|
||||
|
||||
EMAIL_CERTIFICATE_FILE = get_path_from_env("PAPERLESS_EMAIL_CERTIFICATE_LOCATION")
|
||||
EMAIL_ALLOW_INTERNAL_HOSTS = get_bool_from_env(
|
||||
"PAPERLESS_EMAIL_ALLOW_INTERNAL_HOSTS",
|
||||
|
||||
@@ -4,9 +4,6 @@ import os
|
||||
from hashlib import sha256
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
from urllib.parse import parse_qsl
|
||||
from urllib.parse import urlencode
|
||||
from urllib.parse import urlsplit
|
||||
|
||||
from celery.schedules import crontab
|
||||
|
||||
@@ -29,23 +26,6 @@ def parse_hosting_settings() -> tuple[str | None, str, str, str, str]:
|
||||
return script_name, base_url, login_url, login_redirect_url, logout_redirect_url
|
||||
|
||||
|
||||
def _rewrite_socket_url(url: str, scheme: str, old_param: str, new_param: str) -> str:
|
||||
"""
|
||||
Swaps the scheme of a socket URL and renames the database query parameter.
|
||||
The URL is rewritten by hand, as urlunsplit drops the empty netloc
|
||||
("scheme:///path" would become "scheme:/path") for non-standard schemes.
|
||||
"""
|
||||
parts = urlsplit(url)
|
||||
base = f"{scheme}{url[len(parts.scheme) :]}".split("?", maxsplit=1)[0]
|
||||
query = urlencode(
|
||||
[
|
||||
(new_param if key == old_param else key, value)
|
||||
for key, value in parse_qsl(parts.query, keep_blank_values=True)
|
||||
],
|
||||
)
|
||||
return f"{base}?{query}" if query else base
|
||||
|
||||
|
||||
def parse_redis_url(env_redis: str | None) -> tuple[str, str]:
|
||||
"""
|
||||
Gets the Redis information from the environment or a default and handles
|
||||
@@ -58,25 +38,30 @@ def parse_redis_url(env_redis: str | None) -> tuple[str, str]:
|
||||
if env_redis is None:
|
||||
return ("redis://localhost:6379", "redis://localhost:6379")
|
||||
|
||||
match urlsplit(env_redis).scheme.lower():
|
||||
case "unix":
|
||||
# channels_redis socket format, looks like:
|
||||
# "unix:///path/to/redis.sock" with an optional "?db=N"
|
||||
return (
|
||||
_rewrite_socket_url(env_redis, "redis+socket", "db", "virtual_host"),
|
||||
env_redis,
|
||||
)
|
||||
case "redis+socket":
|
||||
# celery socket style, looks like:
|
||||
# "redis+socket:///path/to/redis.sock" with an optional "?virtual_host=N"
|
||||
# (virtual host is the db number)
|
||||
return (
|
||||
env_redis,
|
||||
_rewrite_socket_url(env_redis, "unix", "virtual_host", "db"),
|
||||
)
|
||||
case _:
|
||||
# Not a socket
|
||||
return (env_redis, env_redis)
|
||||
if "unix" in env_redis.lower():
|
||||
# channels_redis socket format, looks like:
|
||||
# "unix:///path/to/redis.sock"
|
||||
_, path = env_redis.split(":", maxsplit=1)
|
||||
# Optionally setting a db number
|
||||
if "?db=" in env_redis:
|
||||
path, number = path.split("?db=")
|
||||
return (f"redis+socket:{path}?virtual_host={number}", env_redis)
|
||||
else:
|
||||
return (f"redis+socket:{path}", env_redis)
|
||||
|
||||
elif "+socket" in env_redis.lower():
|
||||
# celery socket style, looks like:
|
||||
# "redis+socket:///path/to/redis.sock"
|
||||
_, path = env_redis.split(":", maxsplit=1)
|
||||
if "?virtual_host=" in env_redis:
|
||||
# Virtual host (aka db number)
|
||||
path, number = path.split("?virtual_host=")
|
||||
return (env_redis, f"unix:{path}?db={number}")
|
||||
else:
|
||||
return (env_redis, f"unix:{path}")
|
||||
|
||||
# Not a socket
|
||||
return (env_redis, env_redis)
|
||||
|
||||
|
||||
def parse_beat_schedule() -> dict:
|
||||
|
||||
@@ -61,20 +61,6 @@ class TestRedisSocketConversion:
|
||||
("redis://myredishost:6379", "redis://myredishost:6379"),
|
||||
id="host_with_port_unchanged",
|
||||
),
|
||||
# "unix" or "+socket" appearing outside the scheme must not trigger conversion
|
||||
pytest.param(
|
||||
"redis://unix-redis:6379",
|
||||
("redis://unix-redis:6379", "redis://unix-redis:6379"),
|
||||
id="tcp_host_containing_unix",
|
||||
),
|
||||
pytest.param(
|
||||
"redis://:unixsecret@myredishost:6379",
|
||||
(
|
||||
"redis://:unixsecret@myredishost:6379",
|
||||
"redis://:unixsecret@myredishost:6379",
|
||||
),
|
||||
id="tcp_password_containing_unix",
|
||||
),
|
||||
# Credentials in unix:// URL contain multiple colons (user:password@)
|
||||
# Regression test for https://github.com/paperless-ngx/paperless-ngx/pull/12239
|
||||
pytest.param(
|
||||
|
||||
@@ -9,6 +9,7 @@ from django.contrib.auth.models import User
|
||||
|
||||
from documents.models import Correspondent
|
||||
from documents.models import CustomField
|
||||
from documents.models import CustomFieldInstance
|
||||
from documents.models import Document
|
||||
from documents.models import DocumentBarcode
|
||||
from documents.models import DocumentType
|
||||
@@ -81,6 +82,14 @@ class DocumentFactory(TypedModelFactory[Document]):
|
||||
storage_path = None
|
||||
|
||||
|
||||
class CustomFieldInstanceFactory(TypedModelFactory[CustomFieldInstance]):
|
||||
class Meta:
|
||||
model = CustomFieldInstance
|
||||
|
||||
field = factory.SubFactory(CustomFieldFactory)
|
||||
document = factory.SubFactory(DocumentFactory)
|
||||
|
||||
|
||||
class DocumentBarcodeFactory(TypedModelFactory[DocumentBarcode]):
|
||||
class Meta:
|
||||
model = DocumentBarcode
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
"""Record first acquisitions of the global media lock during a test."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from contextlib import contextmanager
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
from unittest import mock
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Iterator
|
||||
|
||||
|
||||
@dataclass(frozen=True, slots=True)
|
||||
class MediaLockAcquisition:
|
||||
"""One first (non-reentrant) acquisition of settings.MEDIA_LOCK."""
|
||||
|
||||
in_user_transaction: bool
|
||||
|
||||
|
||||
@contextmanager
|
||||
def record_media_lock_acquisitions() -> Iterator[list[MediaLockAcquisition]]:
|
||||
"""
|
||||
Record every first acquisition of settings.MEDIA_LOCK made in the block.
|
||||
|
||||
Reentrant acquisitions by a thread that already holds the lock never wait,
|
||||
so they are not recorded. Each record notes whether a real (non test case)
|
||||
transaction was open at that moment, which is the lock ordering hazard.
|
||||
"""
|
||||
from django.conf import settings
|
||||
from filelock import BaseFileLock
|
||||
|
||||
from documents.file_moves import in_user_transaction
|
||||
|
||||
records: list[MediaLockAcquisition] = []
|
||||
original_acquire = BaseFileLock.acquire
|
||||
|
||||
def recording_acquire(self: BaseFileLock, *args: object, **kwargs: object):
|
||||
if Path(self.lock_file) == Path(settings.MEDIA_LOCK) and not self.is_locked:
|
||||
records.append(
|
||||
MediaLockAcquisition(in_user_transaction=in_user_transaction()),
|
||||
)
|
||||
return original_acquire(self, *args, **kwargs)
|
||||
|
||||
with mock.patch.object(BaseFileLock, "acquire", recording_acquire):
|
||||
yield records
|
||||
@@ -177,27 +177,27 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "ast-serialize"
|
||||
version = "0.13.1"
|
||||
version = "0.11.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/21/d5/5dc1ee8a80c3b20a0b63c61b43ba6bc53517faecd1def47bcd752d22268e/ast_serialize-0.13.1.tar.gz", hash = "sha256:401cc84e8888d4d76f2c8d296fa006ed1a5ff993b6aff90dd777c03973efd025", size = 955137, upload-time = "2026-10-17T00:04:17.183Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/54/1e/4f6082cdd6e5a29093513e9a3eabc5ed1c5331a9a84386b2fece80a00a48/ast_serialize-0.11.2.tar.gz", hash = "sha256:976a5bd75845d22f4b52905ddf53ab669ef1b14dba7735f5512841a2ef2b5450", size = 954387, upload-time = "2026-09-13T18:48:55.673Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/f3/a8/fbd136b9f70c59e75f59a8e974c84102976f1201828b4f886480ba956936/ast_serialize-0.13.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:3e129d44b0cffbea24a7f40117ce49e30993c3d119e584d4817ebd6f87246456", size = 897306, upload-time = "2026-10-17T00:02:52.479Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c0/5c/8e959db5cc2237f9d4c560a8e2253c98f9746883fb4774651e4cda458901/ast_serialize-0.13.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:638333fb8ae72c62753f9e794fda20290883ddc65b0d85e26e08f8bb227567ad", size = 1221242, upload-time = "2026-10-17T00:02:56.395Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d6/05/ab1c56c3b7adcac88764bba609502d6b4989e449b2dd60eb478e1d20e369/ast_serialize-0.13.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc34c670747d85d4232834665e247009413eaebe47c69eaf60a5c439aaecaed9", size = 1282105, upload-time = "2026-10-17T00:02:58.275Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/06/dd/7c623d2fb0b868948952d1787e629a43b866f7d4caefd5445e20aefacec4/ast_serialize-0.13.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f3e8a3eff69af640db985360fef35073fb46956dfc3e5c614cf00920d2746dd", size = 1302773, upload-time = "2026-10-17T00:03:04.378Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9d/9c/2266794e6c25fa9ce51ce04a9bf4b7e330e3ac9351ba3fa14e487678acdb/ast_serialize-0.13.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:9221e09496fb942901993c1812ee87950cc0ecbb514c7c0f1f5fa6d78f701ed8", size = 1460227, upload-time = "2026-10-17T00:03:08.733Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1d/87/6e8ac4a865124a12cc4f915bf1bcfac3bba426cd5f58d3712a873ee61012/ast_serialize-0.13.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f8b17e2921e56621bcb46792bd3e0b82ca3b85de78d5936e7b8174ba1758b0aa", size = 1500566, upload-time = "2026-10-17T00:03:15.917Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/23/c4/a8a2ca21e3943555b48221f8fba546877a7ad39efaf6505506524967d7c4/ast_serialize-0.13.1-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:68f8829d114dab6c9db4a8bbb8d0e342958faee1b5e15a29022678df639960f8", size = 1222214, upload-time = "2026-10-17T00:03:23.462Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/15/19/2f58f2ba64e4799b39de85c140aef09a03aa6ea53be75dd292a9d9b9d8ae/ast_serialize-0.13.1-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e385b17d5bde892a6184003a9aff3518387908b73f8f5ea539313c07c8c0ede", size = 1282979, upload-time = "2026-10-17T00:03:24.695Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b4/e6/f2b67c327d9f9533e41791804403ccc2dc457821195a2e51f0b587a90b90/ast_serialize-0.13.1-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:121e1d08d58b75c15491cc3003609cbad71ac2b0016043c36d30a6b2032b6605", size = 1303466, upload-time = "2026-10-17T00:03:30.451Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ee/80/bd29379fab2bce19adc0bf9177002b11b23dfe8d8fecf409998b458b4624/ast_serialize-0.13.1-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:d9c1a920b2aa0c1e016bed7721689717034ca0dba64ac3a3ff243b003d4e8dd8", size = 1459779, upload-time = "2026-10-17T00:03:35.09Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/21/97/897e33bef2eefd880e6350e375cc66bc5bcd00a139be480fd655f5b3f095/ast_serialize-0.13.1-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:0d764913374ba21df8cd618045b371ed104ce55c6276de7c59e554a4f5ba26fd", size = 1501542, upload-time = "2026-10-17T00:03:43.08Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f0/89/0e30f9eddf7d44ccf9d25979030754fd0457af61fa4279acb8c293a04f97/ast_serialize-0.13.1-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:bf53a3ba1cbe45399fc1e4ccd684b8f2a11cca450f89706b79122f478534c6f5", size = 897546, upload-time = "2026-10-17T00:03:50.093Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/60/c2/98370845a7f35cb8a25782e78284b48e01bf3128339881d48d613f304f8f/ast_serialize-0.13.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:1b158f1c9e3a0d386913924c57995d6df78224868a4d0f215bdd41587c97b34a", size = 1229729, upload-time = "2026-10-17T00:03:52.825Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d8/8b/2d7ffed76addd9d3fcf37fb171400942735c8912264c763561a85407f6a8/ast_serialize-0.13.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77a6201b69ce42e919f2fd9a559138d5410b5d8afff7c3a6b1f500b0481ff7d8", size = 1292255, upload-time = "2026-10-17T00:03:54.148Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c5/fa/da311559dd3dae9af5825cf21660775a929b970f72e3786af3f2cd667944/ast_serialize-0.13.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f99786e0d62082a5b121b3437f3167562133711df22128de1e9886f57f0b226", size = 1313260, upload-time = "2026-10-17T00:04:00.194Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c1/fa/c5f4a545f72a7681e3295bab6e3600ee0862ec4391bed961fe9f735b67e0/ast_serialize-0.13.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6ffb0f548a7dc126067fdfb7b2325ab5dfcdeecc29faf5e0f0461c96d6ebfa3d", size = 1469931, upload-time = "2026-10-17T00:04:04.181Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1f/bc/523aa1c08bd69b5654621beb3dc1a9035715a4a63762fb8d219d6fb3eb81/ast_serialize-0.13.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ca9acc67f796aa2554fa3037dccc022a4b08b38b2ad153edfac9c9bb7cb1f3c6", size = 1512140, upload-time = "2026-10-17T00:04:11.589Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a3/2e/beec3364eef4b01793a676d8cd16e9014c42044a5505000ceae3955e33fa/ast_serialize-0.11.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:f6a8dfc5ab204a706f6e5d39c6f77c18c27ef084fa2081803a64a9160ce89277", size = 897089, upload-time = "2026-09-13T18:47:22.69Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/42/8d/cff58d17ba1d0272ff0b7ab5d3bdfcf8f47317eb0f47c001d394bffebf95/ast_serialize-0.11.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1d6ad94edbe93bf1dabc06c9f37d55b898fdabc456aa6d7ced5e23c14f795f32", size = 1216399, upload-time = "2026-09-13T18:47:26.202Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/de/d2/a1da7675af5f42335c36e4da6d86ef4fd7168cead18de81df0a2d6faeb1a/ast_serialize-0.11.2-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40b2801cf2221bd922d9f69d2f0ebc373c3db47207315d525b2d87fa161a2af4", size = 1282064, upload-time = "2026-09-13T18:47:27.787Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5c/9a/84a22420cb312642d7d31547c644d09a3d101418c6d6b9ef2ec30735cf11/ast_serialize-0.11.2-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:efa819d7c14c8e4153dcd84671826331538be7cbe460383fc6386f5eea5bd234", size = 1301941, upload-time = "2026-09-13T18:47:34.418Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/51/52/54eeef9918e187ced417c4363eecea66975314cd5b9c91759eef7f7b714b/ast_serialize-0.11.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:0de02520c11391a026e62987a9aa2c3c2ff01545155059ddf0c4bdf2c5ecbe9f", size = 1459057, upload-time = "2026-09-13T18:47:39.891Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/48/a8/bdd3989f19de09cffcd8179c131f6741a5a8619705fc75b09541ff61530b/ast_serialize-0.11.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:08eda88a0f290a36c38cab33df8bf7e35eb95bc802ca5beb2c8fcda471a7d10c", size = 1501597, upload-time = "2026-09-13T18:47:48.265Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2a/ad/439c2959150718446af76fbe2f4000f35eba9869ef8564f3d9a3d0b1c370/ast_serialize-0.11.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:a586be418eb70a9f1396cea29ddac8f4b9bf277fb73ea2340db31e218bc00f32", size = 1215705, upload-time = "2026-09-13T18:47:56.178Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6d/d8/2c6542fc3e7c56a0a25d8d12d034d5a2d2e1900e292567b1c1dca8e83124/ast_serialize-0.11.2-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8532f20916fa3189d4d785ef2a62d93c4d651ec9c5bffda66d2fc36898351f34", size = 1282530, upload-time = "2026-09-13T18:47:57.619Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d8/85/754681846f26e0ff1da729b1ffe3171e93c22f0aa6ec3cea5b14e3703846/ast_serialize-0.11.2-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b78e6fdef3b06c86ed263e1962fee5a7b9d2d158e738b212d13b2c605ee12f5", size = 1302271, upload-time = "2026-09-13T18:48:03.915Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/bf/cc/aff4d84c16afa742d13a75384127c7d24594dc8c304f0558a15924fd51af/ast_serialize-0.11.2-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:bfbe47a3a7c368f28836e78b2440a3643ac0ec4c67d9fe53588e1448f0a3d35d", size = 1460006, upload-time = "2026-09-13T18:48:09.162Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/0e/16/d3703a7c1e3c76b144ac9349a54d3926d0749918a8dc13a66cede208b8ec/ast_serialize-0.11.2-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:9d80a81ec84660422579bdb8e789f656a794b48c7a1ae1261f6bd8bc1897d17d", size = 1502499, upload-time = "2026-09-13T18:48:17.405Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/45/7d/c4f36898f19c728d091cdfdf960c9488e8d82bbe2e49ba13c05f43907a5d/ast_serialize-0.11.2-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:89499a439955931281986e97ca4dd3c064bf0d2e0027c0017344eb86667733a1", size = 897204, upload-time = "2026-09-13T18:48:23.695Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9a/7e/8f2ab68bddbe58a66fbbaad87beeae3e7d7edddb17263d1fc423936cf34d/ast_serialize-0.11.2-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:1844ed9a487fb3de7325c52ddb33f2918b66b65cd54d3f8d83d23785ffe99fa4", size = 1228053, upload-time = "2026-09-13T18:48:26.788Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d2/1b/8a69ab68f4c1603819f0481d756abdd8caf27cec7f1d77caa71007ebe997/ast_serialize-0.11.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b17869f4ba261a5fa468a753328a548f4dbaf74b4eadae9e28aff66df7f1425b", size = 1292542, upload-time = "2026-09-13T18:48:28.295Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/04/6f/4c992cd7841ba589fefb14ddc9aff2f6db7f2a615d4074f9ad04115b5ce0/ast_serialize-0.11.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a7004ba572f09be34342ccb98dcd4bad5707d3d81adc8cb4c3f685d2a2c51bbc", size = 1312642, upload-time = "2026-09-13T18:48:35.294Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/42/3a/250643ffad02bda520c50a9a5f02a5d43259a06f34ce393c91761d134d7e/ast_serialize-0.11.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:00bbf1f6669f813b48925b759f7ae4591067d456d443924055cab386e7e0a719", size = 1467653, upload-time = "2026-09-13T18:48:40.348Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2f/eb/6108fb9a43fc7ab5529856e38e33c6e3e064fbfe375fdcbb208c7cd5438d/ast_serialize-0.11.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:2fa3be25f7f5351b1b39c9f8a52779b2dbf21199efbae564b4746422e8edca4e", size = 1511621, upload-time = "2026-09-13T18:48:48.667Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -984,7 +984,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "django-stubs"
|
||||
version = "6.1.2"
|
||||
version = "6.1.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "django" },
|
||||
@@ -992,9 +992,9 @@ dependencies = [
|
||||
{ name = "types-pyyaml" },
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/56/d0/00a9af43bf65ee54706e29b1c41b3a00d7a97157fbf97ed3038dcc73d584/django_stubs-6.1.2.tar.gz", hash = "sha256:d62b15fa5cbae79b1922d015e1454d299959d230221dadb23f65c749480b97ec", size = 295860, upload-time = "2026-10-05T06:47:17.595Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/2b/d6/fb467f5f769b831680d8cb6705e4bbec335c79b328ff7e347e220e676da8/django_stubs-6.1.1.tar.gz", hash = "sha256:291fd79197416d191ec9f4e443bc6800b64dd5d41e476b91e679495d005f3d61", size = 295523, upload-time = "2026-09-14T08:46:24.686Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/96/36/206be00ba6aaf21c72cf61fd38cee492c7dcf51eac72fd61a9f7ddd0f916/django_stubs-6.1.2-py3-none-any.whl", hash = "sha256:ffb6e74f54b8c1f9b2f3bc4852c5abbaa2324b2a7cb1c51854c5f95abe67165c", size = 559846, upload-time = "2026-10-05T06:47:15.889Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9d/26/911e381b1cee7fbb7f11f640ec4be4ec1b6ae49dc58ff2cb829cf12dc4b9/django_stubs-6.1.1-py3-none-any.whl", hash = "sha256:a913d0c35242cd820f638486118fd542d687b6a85104bea9cb7e635b52b889e3", size = 559401, upload-time = "2026-09-14T08:46:23.153Z" },
|
||||
]
|
||||
|
||||
[package.optional-dependencies]
|
||||
@@ -1029,16 +1029,16 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "djangorestframework-stubs"
|
||||
version = "3.18.2"
|
||||
version = "3.18.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "django-stubs" },
|
||||
{ name = "types-pyyaml" },
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/e5/9c/4b03ddfad674f1af89fed3d17638fd6e5893c2e5d33871689a135cbef5e3/djangorestframework_stubs-3.18.2.tar.gz", hash = "sha256:a8e009eee5e7c78c0a0a28cc69875bd1a44bde5499de085e52461479dc9522b1", size = 37849, upload-time = "2026-11-02T23:46:17.881Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/6b/71/a7727b07e0433da02fb1ea22994f492ecb437a1fe7be5bf952dbb545a0f5/djangorestframework_stubs-3.18.1.tar.gz", hash = "sha256:65ed4a9ea094616759a2cba4fe0ad85efe25b471b28281b790bfefb46704c64a", size = 32439, upload-time = "2026-08-25T22:49:27.506Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/fe/0c/8778cb6fdc650867ecef1b2e5fbc6004906d37cb7bd4a781bf25f503f57d/djangorestframework_stubs-3.18.2-py3-none-any.whl", hash = "sha256:fb4bffc3037063535390fd2cfde11f81c182e05949220d4742ffc0485218972c", size = 58013, upload-time = "2026-11-02T23:46:16.487Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f7/1c/e266828fe2b78484651667976f8539e47b4e511a266424b890f613c6b7ad/djangorestframework_stubs-3.18.1-py3-none-any.whl", hash = "sha256:a2021f45f7759b493504c2a721f112ec4fd677753590c1ba346f4ebfb49a7f03", size = 55685, upload-time = "2026-08-25T22:49:26.178Z" },
|
||||
]
|
||||
|
||||
[package.optional-dependencies]
|
||||
@@ -1811,51 +1811,48 @@ sdist = { url = "https://files.pythonhosted.org/packages/0e/72/a3add0e4eec4eb9e2
|
||||
|
||||
[[package]]
|
||||
name = "librt"
|
||||
version = "0.17.0"
|
||||
version = "0.15.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "mypy-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/ed/82/9b31a8cd0fe33fde43132f43d2dab766976afc0d3d0763ea6082c4385b22/librt-0.17.0.tar.gz", hash = "sha256:fd18d1f708f78577556a7d76505048b9e3ad6ff61b8d9c91616a5a3f1e6c770b", size = 240190, upload-time = "2026-11-19T14:10:49.327Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/36/9b/356320fbae2ac8467e21c5e73e1389c80468e4998c62cc7d3536cc51b614/librt-0.15.0.tar.gz", hash = "sha256:4e66cbe84437497d951b799d3e1551291b6fb3d643820a7014b3655d57a59162", size = 214338, upload-time = "2026-08-07T10:49:42.663Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/02/0c/dd328f18f9b12e1c5ed82263f762d1961cf3d8039d068127190611994828/librt-0.17.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:00c6499ae28dcf5882547dd7b5f8e69e119a68e335a4d7244c278c2cd849b8fd", size = 176052, upload-time = "2026-11-19T14:08:28.768Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c3/ee/f926a8967973c9bb5853dc59c4a8695da7471057b6f5265db8b9ff01147f/librt-0.17.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7be0c07b6185548a1087f3120dd3d7aa64c07813f8b76b8fc97e2b2a1fe36450", size = 576194, upload-time = "2026-11-19T14:08:29.854Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/eb/b1/a5466d1a81db0f7a08846893a8f4692cadb9802eed43899b3d5ff15197f7/librt-0.17.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:598c5455f07fc182a926b88e63776c49dc4cf47465c998cbc6ba1f010b875b51", size = 604649, upload-time = "2026-11-19T14:08:34.057Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8f/78/aa5be904719cad4c105cddd1a170407a926d59fa4b93a79e2fb18fe32d8a/librt-0.17.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7f8600211ee5eebba8a5436219636c6490d74bb342155983b8def12ddb976d9d", size = 622868, upload-time = "2026-11-19T14:08:36.82Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/71/12/82136f3d3e971cf7dfe66aeadbf12689d0aed6fd9aa923309ee88d3b92db/librt-0.17.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:8717505c32aeb19fa8a85bfbce8f25dd092e497a4ce78ae52f508d5c3beb4f87", size = 650299, upload-time = "2026-11-19T14:08:42.346Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1f/d3/64490c89bb0cbccba16a5c13118a8970f60e8dba86a0fd6f2ccb4a7c01e1/librt-0.17.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:766b874a93f499ad64b33f0d75c993e218cc113c74f651bb9867f275c92b4059", size = 178458, upload-time = "2026-11-19T14:08:48.051Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c8/48/0febcc7e15999caa97a3af1f51a5f1a13b485738150491eb620f54ef3eb7/librt-0.17.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3e8ab915c48e949dfcb0a2b299af96a6707d561fa7079a21169a4bb2aafc45e0", size = 590405, upload-time = "2026-11-19T14:08:49.216Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/12/7d/cc942cf3088e1544053ec36bd3a8266a755251eeb2c3cb5329eab54c80a3/librt-0.17.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:afa8a6a1916f155e6f35c48d6cb547849af79e07060e36b6aaec1d1c63dc3c7e", size = 623563, upload-time = "2026-11-19T14:08:53.32Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b3/ca/91172e4c888c0bdb7c2976d2220913675c0f8df7154ea566a90aa08a9d54/librt-0.17.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:477051a5c98895a0a6ea67cf33b84618adc10dac28f348efc287e170913097cf", size = 640205, upload-time = "2026-11-19T14:08:55.869Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e3/5e/2d33a4e2bea5f5a30c641c7628770045a39850db4129ecd529015e00222f/librt-0.17.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:d5ce86ceb3adedb4f26d8e39de1f96483f4c348c32874deee7622314157f7dcd", size = 671611, upload-time = "2026-11-19T14:09:00.786Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/95/20/65b566c337a0c7b9b3395243ba459d6f6790ef95fa625f0cf96f11d41096/librt-0.17.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dc13eca8c176542b45c4c52ea31bb9e150f3156445a94dde497b7f3880779cf5", size = 178511, upload-time = "2026-11-19T14:09:06.465Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/96/64/d5e9e360d68bd30c9d88aa6d1fba0d1642a87b22fb1e78619f94c6bd92c1/librt-0.17.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:343d12d5afd461a134280082bec8fb11f3880c83f9caff3de5268f933b7c826f", size = 589797, upload-time = "2026-11-19T14:09:07.601Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a1/9a/0c3ab8deb865fae9b18a25f951fffa28d1c5af3458f6f8134d9cad24780c/librt-0.17.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e3dad4792d84979f5f1aaa46d22cd062b15f4551bcadc7d2b695d42aac971bf5", size = 622828, upload-time = "2026-11-19T14:09:11.183Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a8/1c/c28510381a752fc5848b4c33fc1b0e2f00254a69df1a7fe3708a616925a6/librt-0.17.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:dfd17a61ade81f579d64e50461524bd96255168eab42f56eb1047266dc38adb2", size = 639874, upload-time = "2026-11-19T14:09:13.987Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/16/2f/4bb1c72686c77fb142b98d19b97783a87f9620b9f730e18312534f6d0629/librt-0.17.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:20c742248ea9e1f9fb2ccbc44b5975d39f0aa4a52178429053e76526238fe14f", size = 672198, upload-time = "2026-11-19T14:09:19.573Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5e/8b/1642139cf8309ec08c4fe22386860096ceb4a5463ab23f48500fe0c72a2b/librt-0.17.0-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:47c9ff64c555e70f980313973c0bedd469d7379f79ce90bad551b4b2475968e6", size = 89665, upload-time = "2026-11-19T14:09:21.065Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1c/9b/95bf85408ac30f33f27d00ed15ef45b095fab11965cbb339e7eaaa5284ad/librt-0.17.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:810c55c2248af580c248114e3a8529677bb27fed541fdebbdad4e37339915f08", size = 178113, upload-time = "2026-11-19T14:09:26.729Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f3/0f/86b2d5024c0531fa2de12fac30eb048c7aadba0a24b75a2dab7782adc320/librt-0.17.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:87c5ed7bcdd937dd001d034e42de355818419a50c1d98f8f241a7cb8615c7dcd", size = 580062, upload-time = "2026-11-19T14:09:27.879Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/71/85/4d4525b1b84b85a9ed6113ee80e36853b8102cd6cfe902dc5de8e7280fe1/librt-0.17.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de7dd4d3ec15cf15299cd30839773f58d6dc109a057cb2c797bb11fba478721b", size = 613660, upload-time = "2026-11-19T14:09:31.479Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/bd/54/ef85de8d6a1ec02e6d687982c9fda1cc4529e264ca52abf7b9288e0c232e/librt-0.17.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:09b3638d04e8089256615b776b40d3977566ee27c1d2d3e8ef7856c406410063", size = 630560, upload-time = "2026-11-19T14:09:34.795Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/65/e6/bd0381728d134b4ee710f5375783c9ec2ae2589e2584f7bab477639c7049/librt-0.17.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:28c174fc28a859189c6c4d370029a8d33e24f0147839c8ee35110d111b0b6fc1", size = 663123, upload-time = "2026-11-19T14:09:40.405Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/08/8a/6a6422bbb1832619e32fd2ea7c36f977f664814b75da0ead39c1cdb7b83e/librt-0.17.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:b3132402abc0063823c91012bb74ae02787c8f77086e659f9b41655d3ef18b71", size = 88933, upload-time = "2026-11-19T14:09:41.67Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2c/de/fbf00359194cd86b605408ddab944cb38eb36f7a4a881bb67f0402795a1d/librt-0.17.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e70f1366f7bb9771865aa8c22da92e36a42343b78a9ced1c379b066b2b46eca3", size = 188421, upload-time = "2026-11-19T14:09:50.068Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/76/af/571c068d03462b3353b188832c7c4696cac4db6502cde45553f16a3f0699/librt-0.17.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:00bca40134bec8887a05a46188c160994414231fa5fce63a9695e0fe6120ab8e", size = 815451, upload-time = "2026-11-19T14:09:51.738Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/fb/dc/ed1f2d4656050b546eddd02c282f931aa65fdf120ec3ab72ab564bbc026b/librt-0.17.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:012f8d82d1c6c7d682f607fa2d550fbbd8331b3c4788fe5b49d44a9040dc2b15", size = 835292, upload-time = "2026-11-19T14:09:56.262Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/56/9c/830d7ac3495d4a937a587ee58588737c7107634e9aaaa47adf6f30f7d4ba/librt-0.17.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:b1936d4823e26b7a3abda2ce86fc59536d5bb60e7988e625ac0134cc4eca30cf", size = 878244, upload-time = "2026-11-19T14:09:59.261Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/52/01/24af76e60b109e9dadf224fd6146ccb6a6b6988b29697ea7f376d78c736f/librt-0.17.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c32d5577eafc07909517991d376051e5c9c325caac4f29bab850826847bfd821", size = 901214, upload-time = "2026-11-19T14:10:04.498Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/33/39/1e915df6856286080328d5bb59f6212ca898177e6703d51f9bcdfc33d4cc/librt-0.17.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:b00337cf863338beb677f1ee84eb5d1e7c2b9e6ff3e1737951731bde24d95997", size = 178033, upload-time = "2026-11-19T14:10:10.542Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/de/4f/b318012f19e8d255c2f0f630ce2e52946161a0707e670540f8953bc7d736/librt-0.17.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d32a83e07306f4dad53a264671b55380e418f51d4420da85273725492189f95c", size = 583638, upload-time = "2026-11-19T14:10:11.684Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c2/77/c46367c17519e22d38bc07e11d5495565e5bc22112924ace7127e13740b2/librt-0.17.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dfbee84c9e0bf961781e45201e1ad110dc4e85d9ad3bad266193300d61f842ef", size = 614977, upload-time = "2026-11-19T14:10:15.537Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/28/1d/314e4490e5cdf61faf5e75d14fb78487515537e3eddd2719616cd3683c33/librt-0.17.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:681d59c924342fb1478c13b64c34c081051e1a8916fb6d3fa47ab06db79fe2a6", size = 633093, upload-time = "2026-11-19T14:10:17.931Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f2/b6/e57f5d1ae1c5bc57bc9fc9201c6e988f18fa052333b07fc3a84452e8dd3e/librt-0.17.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:2929dc060fc953767259176b8ebef6fa8f51e19c6ed3e832a9e36bdecc4f9cb6", size = 663709, upload-time = "2026-11-19T14:10:22.726Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1a/7b/6bcf8ee15a4dbb2a42be5dbc247243775b32453e3fc9e622b3f372395006/librt-0.17.0-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:a78889bdd2ee392dccb11709c5ac1a7875aa6bc4bf46e7f329d5e39b7c2ddca5", size = 89059, upload-time = "2026-11-19T14:10:24.026Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/02/eb/761675510b5d5a84418ac087e24d3ec848bcf3db4818c3a7bfd35d392b56/librt-0.17.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:271f9a8d2964c596b1d0e09b4f1507cc3b379d2fcbf3c6bd2eb23a051518a4a4", size = 188939, upload-time = "2026-11-19T14:10:29.678Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/43/14/ef6b9df1da067b9d5e38ede787395da1fe03945e8c67c06cd9b5546f595e/librt-0.17.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4ae97bb49097ecdbc974f9ca4574ab2ce5827a0e5c362887dcb5a423c1024a6c", size = 822775, upload-time = "2026-11-19T14:10:30.835Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/01/2c/7707248709688071e15116a5456b6ab556a5f74d228d4d84b8c7289c1424/librt-0.17.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a91a9bf401629d570614308a04625d9b66fb6e6edda57b90551b5d62e0d69fa9", size = 839830, upload-time = "2026-11-19T14:10:34.422Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/37/90/f9afb70bafd93c646a2a162c48483514db3335f0501537bcdd49fe5087d7/librt-0.17.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:cde2f4b096780c848d0ac92b02965552fe14479400ac074b9c7764b202a4c2fa", size = 887761, upload-time = "2026-11-19T14:10:39.544Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/be/ae/35452d2a93075967ecb93c70077d468c4ca800991f388b099c7c7f31da81/librt-0.17.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:002d5eecaa87785f768d8149827a433829c81b94739925b7d56212a791dc912f", size = 907730, upload-time = "2026-11-19T14:10:44.817Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e7/1d/8e150b7fc449a1f33c8a760965cc1f43b14fc1577d9d0b50ab2701420e74/librt-0.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c70bc1b602cf59917e8f0c7a2cbc8bcc6fbc14d5486136b00707a79619121d63", size = 153067, upload-time = "2026-08-07T10:46:42.418Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/51/87/a162bc5a66a35599dc619ecb215145f4de7d68e886b479b6d12593139f7c/librt-0.15.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:814ff83a25b5fce8b9c80c4dd803153fb5c5599fc74db9e022466938368957ef", size = 493087, upload-time = "2026-08-07T10:46:43.657Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/0f/e1/7a65eb5dedb1f00aebd948cdd8e17add48bf066cab3514e9daf84ab45a6c/librt-0.15.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f779070399f991400fc451719e0ea388eb7de313388bada2c127a35de05f798a", size = 516002, upload-time = "2026-08-07T10:46:47.599Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ea/0d/37fa73f3b43ebd8259f91ae9102a15e5a54e65d581e48dea72df3e81d7a4/librt-0.15.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e0d00c708fb2f5822b152429b1ac80a58dbbbc3f6c232c4d13a3f7fcf2ea5b4c", size = 530422, upload-time = "2026-08-07T10:46:50.45Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/36/93/f8aded0d6682b4f25820fa86e0690f87f01df9fd7bd09ddb04d9167ad021/librt-0.15.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:97335f59082f9fe2ce6c2a9cc6433a0114bbb6cd4d5c09dd76c95c68b9f9a8b0", size = 557686, upload-time = "2026-08-07T10:46:55.443Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/14/43/f4b1bd1b2888798a1409808889a25ea1ba49eaabce7d681ed27734c2df9d/librt-0.15.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:71599e011ac880e8e45d46047d714871894c7d4ab6f25626f8d4f89da21f368d", size = 155267, upload-time = "2026-08-07T10:47:01.311Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/0c/db/3ad9c965c72f1e1d6beeec44ec10a54e17be8ae042fbb4baade16cbadced/librt-0.15.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c802434092b769b1d613ed2e13fac15fbfce1934a74bd10283b03c0fae231cd1", size = 503136, upload-time = "2026-08-07T10:47:02.45Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a7/b9/bdbb0b648b5c2befb031f4c6f3b1dd857415e8fb492a25a3c764a6681e6c/librt-0.15.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:89cc46cfd15022e35084355478c9ac809d90b1152222706ac9a7655ec21df6fa", size = 531904, upload-time = "2026-08-07T10:47:06.211Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/26/60/03b3abb82b41714671b907bf6989b228e31e6a8af52dec82b5b0728dc250/librt-0.15.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:cc30523e3f1a23fb7511cc659834a0d01a1042bb9de359bc1c131cc4ec6c9656", size = 543155, upload-time = "2026-08-07T10:47:08.866Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c9/4c/cf9601c1b4c5f09280acd5d83abdb2e68527a2be8257136eb42304218622/librt-0.15.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1e47b8ba865d7ede071a91a7163073bbaeb72541f1ef8a07d512c45c7b5007f2", size = 573688, upload-time = "2026-08-07T10:47:14.727Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/3e/e6/36c2299b7a94b84fdd01220d8a777a71be5be0925bb0dbdf71c0a06a34d9/librt-0.15.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:aa1f1995789dca3698bc550aaceb09a51bd5df0a057ff84ff15296cd1975b801", size = 155194, upload-time = "2026-08-07T10:47:20.398Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c9/b6/ed5071f9325845e670bd36012757419767fbf56af77ed483077b9e4db541/librt-0.15.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:55456ea87d8df21808446d03817be2f65e20391c1c615d9187440dff28cd08dc", size = 502568, upload-time = "2026-08-07T10:47:21.652Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8d/e2/c08fd1d36ce63ea5a12b85c5d37f4550b5f86a692167e41e5a74222607ae/librt-0.15.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:234d8d394721fa0d786af15ebf1f3fb7f3ed82fd1cd0cde45c2f247b5d4281d2", size = 531661, upload-time = "2026-08-07T10:47:25.507Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/10/cc/075171517b41f861753034fbb151b42cfc83bcc853849f24f5e66fd60ccf/librt-0.15.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0f0ee3644d951f31055ad07d77d92520e84505dd7a432cc4cd501dd70ee06785", size = 543201, upload-time = "2026-08-07T10:47:27.999Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1e/88/c6dcf0dd8e26dc0c9a499a2abab8646c86dcaf9ecea9524cb46d3686331a/librt-0.15.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d28a05796b99f749bf8794f17ba9ba1612d0076b802e9cfc62c554634e9ce3b", size = 573700, upload-time = "2026-08-07T10:47:33.527Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1b/9b/ab54c71a7918a7c34fa5327fb61390a77446a07a146fbfb1165250a61035/librt-0.15.0-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:2067ff438048cead9d223ca5675bae2a25e520a7c3e6c1498bf9c6892d22caab", size = 82194, upload-time = "2026-08-07T10:47:34.835Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/61/ca/8281aa6cd560a3420e4497729f6b704b53be3eeaaef82d5aeadddaf7441f/librt-0.15.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:6c0eb900c0e91f4aebe680845242e614f1864edfd44106380d0752ac29522bf8", size = 154088, upload-time = "2026-08-07T10:47:41.065Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/dd/02/1a1662dceaba6a086360891448d5ce9a7d3555976cae59a31a39d744b9c7/librt-0.15.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e8c9a650a188e38bac005048cbe6342e81407782944d01934540ab75e417df21", size = 494215, upload-time = "2026-08-07T10:47:42.388Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/95/82/01940e40b83c43a546c4a3c896cf34ca272a9690899d55914e4827b3dcce/librt-0.15.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d4c7bacb70930f3d0a56f4ecf1be474a1f0d941b01dd73b756f3c256d42cb879", size = 523073, upload-time = "2026-08-07T10:47:46.66Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/0b/27/894e072228fcb159703c655da69f8cd10dbed489c36e3df7dd032a2483be/librt-0.15.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:a417149c0cba4d50b61e992e5a15e69eaf96746609b461cc4ed168aeef6b79dd", size = 534164, upload-time = "2026-08-07T10:47:49.875Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c6/4f/d1be6a01a35c20ef734e0e44113f87d4af756a9354a89dcfbe3b4f8af5e1/librt-0.15.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:96bb17dbe8bab3c0954fbebfc69ed395599de75b6bbc35e3270a878e15d4dd65", size = 565868, upload-time = "2026-08-07T10:47:55.566Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/67/88/649cfa33f5825927b160610f670bdab012a64d627eddb94fa795ea4292fd/librt-0.15.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:7220697efaa6e5348fc3d18ee7f8563d4bfecd9872b37ffb915bfc1d08840622", size = 81619, upload-time = "2026-08-07T10:47:56.886Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/75/03/1b53cd4ef904e73b1d828a5f90143bf94a2967d7cfff0b9ccf93e12aa9b4/librt-0.15.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:8b2fdd7ead3c995c37940a790690660d0ca006c302db26cc51933f6766866fc3", size = 161638, upload-time = "2026-08-07T10:48:03.725Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ac/c4/9f9c9fba097d49e9e694c2b4dc331df31884645ecbc58a93b4b5fc69d2c5/librt-0.15.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2fde98cf1fc4bac144ce23c2c4c017b924ba714509ea9334977b0b27050c837d", size = 701795, upload-time = "2026-08-07T10:48:05.135Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2e/0f/1aed6223d4f9f9d1171a8596ff100ea4c3f7699fea7a4ba657c3e60daa6c/librt-0.15.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b845b8d48088fad0cadc84be4b8fda63203be7e9237b71015b3925443c1f35ab", size = 722542, upload-time = "2026-08-07T10:48:09.569Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e9/1b/c327ef6018e3a9ca0b8e7c5eddeeb331ba8f9b76c24e126d37d0f6d62faf/librt-0.15.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:64b0c8c35aa4c4ed79896359f3e0b285cbe4e610042106500da4811c322cc108", size = 752891, upload-time = "2026-08-07T10:48:12.558Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/79/91/2270a9380f11725cf83ce1925a5e32dd1dde2be9bba597f25c10a38644e7/librt-0.15.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c7eec6a42018bc1d45763b1c162d3d2bf7c3b9a1b0ed30d3e91dcba390efefcc", size = 774417, upload-time = "2026-08-07T10:48:19.611Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1f/eb/5d9ab71e30119c44094e0275f38b47dd327aea0f843a080396677029d508/librt-0.15.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:6d15a29033c57490cfe2069097c6fc4049e4e65ffbb749be7dc453b7c4c68965", size = 154510, upload-time = "2026-08-07T10:48:26.485Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d0/9c/8505d1b8f5e8c19587bd03f7429993b3e9ce5c06819d856bfb11d919374c/librt-0.15.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d2c05c729b589e734c09578bf5964be48a911765484840d017bbc84f49d4c4ad", size = 497543, upload-time = "2026-08-07T10:48:28.045Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6b/c6/2f4dd296c97a0b85b98894519b279408ec9dd602d4f692b1ea0e25dee670/librt-0.15.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:86a21a7bd3fe3a419512ef424cc1c020f6771d0b29cfddff36d1635a855e63f0", size = 525122, upload-time = "2026-08-07T10:48:32.7Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/91/ed/4bad71adeca8fe208b775c2a35417fa5a2584c8f4791daaf89a89450fea1/librt-0.15.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:d8edcf6f550e918dca779c069b9e156385c60b406f99fc7641f32c52f7193659", size = 537258, upload-time = "2026-08-07T10:48:35.88Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/65/7e/c2d98766124400d722063a630b0fde38a9fc768705d37eecca15c47dc192/librt-0.15.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:32896a0af72508ea979e0acb4e4c04cbeeae04938167950d535c83c45597167d", size = 567736, upload-time = "2026-08-07T10:48:43.124Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/55/6c/f8c34a95e3a515c6e1c192b89511e7253c89a7760c6b500d57ffdb8d2dc8/librt-0.15.0-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:ec3ba415afaf951f6951b1dd16d3c8e4f540065fc382d7e70b823a79567ca374", size = 81673, upload-time = "2026-08-07T10:48:44.645Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/06/bf/043097353f9b3c73b583d07f6b8e552795463f4bfc8caf85e42eee50c26a/librt-0.15.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:e0b5deec9a8664eb722c797241970fd4aa1894d25fda36a1ddac0f7407606bd6", size = 161686, upload-time = "2026-08-07T10:48:52.174Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f4/2a/8ae77f9719d42ce71cd708560a3557b38ac3c17a0383e57f87084de45bbe/librt-0.15.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5563302a8359bc2295bb7084d1a8ed1519df96afb30eb2aa4e0bff7b54228988", size = 710668, upload-time = "2026-08-07T10:48:53.782Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2d/53/b34fa9d0ff00f136f4d58ebb4c411ff634baed1eb412bb602a2bc8dcafcb/librt-0.15.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c47318cd3a61401452de11282242937e3e057c4fd3dbaf601e269d0928a06c0a", size = 729847, upload-time = "2026-08-07T10:48:59.231Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8a/f1/e17a9bb5de6fb8c3186ed1a7d68d21618b027ac2d3633e03d3b6109c67ae/librt-0.15.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:077471b3182db4e17c36ae91555f36a4d2c00080b267f749bcad34a478a9a302", size = 763454, upload-time = "2026-08-07T10:49:03.039Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/40/32/a04b72b1aa86e3be23b2ecff8c1aad2dcc955bd3956d6d26e7e34267e57a/librt-0.15.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:291bf73caf78b9e88d6fae9bfd693207ff7d832e2fdbe2cf8e746bc13f5f892b", size = 783763, upload-time = "2026-08-07T10:49:10.661Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2271,7 +2268,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "mypy"
|
||||
version = "2.4.1"
|
||||
version = "2.3.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "ast-serialize" },
|
||||
@@ -2280,39 +2277,39 @@ dependencies = [
|
||||
{ name = "pathspec" },
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/4a/3c/78ecece71ee4b5445389a4ccd11627cfb9c69e4de554d11060171f376305/mypy-2.4.1.tar.gz", hash = "sha256:63b590965691e540a335fa74dadf31a7069142f6b72e234689bbd244edf55623", size = 4066728, upload-time = "2026-10-28T19:23:13.286Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/82/6a/878cc1097d4035f82bd516658d0c528d2a9955bc7b363afcbd0b07fea11b/mypy-2.3.1.tar.gz", hash = "sha256:47c1b1207258513a9d93495f69c8be9de73916186f0e52703e8c461b7a623419", size = 3992554, upload-time = "2026-08-15T03:03:38.549Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/4b/8b/2bc7f489528db504221ad7eff6b3f83979ee57d066103c72a85d09046a30/mypy-2.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:79a1e79199e980fb41f219cb3d4746d25c64b0b623840d3ed57df1cdc13a6502", size = 14321495, upload-time = "2026-10-28T19:21:16.612Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/18/9a/b2f037b4982dce33645296e4394b031ade60f697f468761fa3ea8e2f8ece/mypy-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e18d0da3898b3bcd16192f15a206e7b8b8dd0f4a0b3e51aa5bd5c2afe749e2c", size = 14467468, upload-time = "2026-10-28T19:22:10.629Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c4/5a/379f9bfa18bf3f8d43668fbd9ae4f2922dd027a559c461ca9d41cde1d32e/mypy-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b69a15fc2e75858d6b15e91ed3a0dcff1a533265183b64734138791fe0f49aa5", size = 15421496, upload-time = "2026-10-28T19:22:48.005Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/83/50/3bde18a2824ec296432cebe01752ccd0ab8a2ad784abe4390040d019b3bf/mypy-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:70971cc0bcb1d3f03d2eb68fa430a6481ccc03558dc001d9534d7e5fa274c392", size = 15670425, upload-time = "2026-10-28T19:21:57.026Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c0/1a/0be9dc6af5e0e04128f18a5e36b4ca44bfb0085857d37aa6a7de1ac2b0cb/mypy-2.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d63737426a048a27705a4eedb828669f4bc0873612a1b46b0b9fe892b2ebaaaf", size = 14381321, upload-time = "2026-10-28T19:21:54.223Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/0d/a6/7907e36711a8a8c703f961f076fab61793383694140bd1fd87589f3f68d4/mypy-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7344869cad05f073b8cae2826774fa0161e3eb2f5c685b76813574008d77d750", size = 14466373, upload-time = "2026-10-28T19:22:25.211Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5d/b8/7313212b29de570c25c9859d7c8e4ef2251a6d34338a1e20031d94297721/mypy-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a20ff6cd2af7a670c64f089bfa5fbcebe8ff3bf896c5e6ac7c9862c7960e4494", size = 15553666, upload-time = "2026-10-28T19:22:36.511Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/23/8f/92966b6082ff49da9142e1e527eb9af4359a9a61632a1cfc313da96b37fe/mypy-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:9ed1195502cca32be5ef756b1693477f4991db2f2e34eaa90cc4ad6bea4f9531", size = 15802641, upload-time = "2026-10-28T19:21:13.421Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6a/65/cd19bc06b67d2df4828220245fd98569ba40fac00c60ba48bef1817d8ac3/mypy-2.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3f1613bfe6726169a5680ec3dad5fe1f6d96285c12aded51ad432eadedd39d45", size = 14214179, upload-time = "2026-10-28T19:22:27.49Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c9/db/4d54ca4f49a0113d0c956980272aefdc6eec5458f7a72b350785b9ef2249/mypy-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:680ba5d9f0e3fe0c746b3d14df15f2a718e4bc308a1145616a1ea691ce7c354b", size = 14376217, upload-time = "2026-10-28T19:21:08.019Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a2/45/089b4724b85f0f408941be5298f817ee89181c1ce031a73d60ebb150c2c7/mypy-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fb70621535c22fd4b1a0450d37ed1d6c5eb39656a1cebfb189084c12de54ba7", size = 15467623, upload-time = "2026-10-28T19:21:21.555Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/27/4c/15edbc64b0b1412bfe94c74192b3b56554ab642b85a31bb06cef6313101f/mypy-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4af5ad558033bf71a44a1be149ed61633522824f84c1b6bc2445d3fe2d2a5296", size = 15729867, upload-time = "2026-10-28T19:21:37.557Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7d/75/282d43d6fea7be984ac63e75ffd8eee146ba2f3b077bb1ca5bf3f973e0c4/mypy-2.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c45485061ba08f700acc12cfc8b177e6997e6bc353605babfc0abb081e079456", size = 14233251, upload-time = "2026-10-28T19:22:44.977Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ac/a8/9021263cc7e761451c7d8131bdfab3c0a5c2d67aa2d694670019e1ab86a7/mypy-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:727890a32f1858c09549eb55a8b234fe990d460450b28f03e8213ef925f1247c", size = 14394953, upload-time = "2026-10-28T19:21:29.492Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/16/10/4192a5cea09ebbc41c534f57bd0d8f0fb42a8e810632cda6e37f072c59fd/mypy-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:beb254fec368c4e7f7f82a5f310c6470b893ec88a90b66426da971c6826b0453", size = 15442824, upload-time = "2026-10-28T19:22:42.068Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/99/e6/d3b0a7474aa4f696594a47a218b6796d9c4346fc81ed288904278cddd9bd/mypy-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ec416d5d2ae689e681f5727e328723f18d8b5dc8c903a146b7851dc5727aad8a", size = 15717227, upload-time = "2026-10-28T19:22:54.026Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/48/6a/2ec530dacd4f77ca50d0fa05b854098f2d75e5d18c587d2612b44f10d68c/mypy-2.4.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:0e95ad0bec03ced9a73b42514208abd24c789e67f0e1eba476e276dd7a2dea3a", size = 7898637, upload-time = "2026-10-28T19:21:41.709Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/3f/f2/827e356fc4f74c60b8da42663336e035b49d948a3c11224b0fc7543086b1/mypy-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2875280687e64740e6ddcef43bd4c5852ad45ff34549740f6aea3f0373870b93", size = 15713427, upload-time = "2026-10-28T19:21:26.757Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a2/fa/e58a4fcae1d238189eac758036c0921992a86e3e6209190efd96d61fc5d4/mypy-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ea0714d2bccaf6d010c970e1d3ba2c9c2add79d2030aad2ef03167d788948276", size = 15938481, upload-time = "2026-10-28T19:22:34.371Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a1/54/a20f881801b88900923f2be1541a4b438ad0f0883e03836641fdc3d7adf4/mypy-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:63c6ff0e7ea546943001a91639c9f0c64b60d239268fa5d29e4a6c87f82c2373", size = 17243006, upload-time = "2026-10-28T19:22:39.425Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/de/1c/ff84a6133a6e89c390bff6b25d9bad6598e7891b205f4b30b496906d636d/mypy-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a5b5da107dc2c93fb0a22f7a45dbaea5dc131afc7056b5468d78e819f9a138e6", size = 17557728, upload-time = "2026-10-28T19:21:43.607Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/57/5b/e44a2edb0b25a9f1429de770e1d0238af23302671dd40c77ac5efeb0c559/mypy-2.4.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:db599d03e7d60d15f2e0a11665c18bc52a88699fcab990fdf8cecd5be8ac801c", size = 14243144, upload-time = "2026-10-28T19:21:10.975Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/59/d4/5c99dc3a28e11d2f0fcbb02df63d2d3e574dedc0f9f69d50901df305a7a6/mypy-2.4.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c6c7210e40dd423af7d65cbe428b5906d11dc60659337bdae4e5fdf02ce32ed7", size = 14409316, upload-time = "2026-10-28T19:22:15.515Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c3/c9/3108b38f4c30eabd80194f5d9771a87e27196c5e0ddb5bf4b99c6ed1e97e/mypy-2.4.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a2d4a51db92059eecc2c33b2a5194b28585ebfd917292c015fe87a77dbff6cd2", size = 15445573, upload-time = "2026-10-28T19:22:05.635Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/dd/12/84a53eceaf11c46dfd7931fb6b8902d01fb33787d3a991e81c461458150b/mypy-2.4.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:01b7718552d017f88d1151f3cc9d6556d778a90bd58060a2c3d87d070f9099fb", size = 15732989, upload-time = "2026-10-28T19:23:06.512Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/65/ba/bf017dc2abdf83b2f74e29c43834b7af67dc1f1b20202f02dae60b4781a0/mypy-2.4.1-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:3467b1d13000812ab85dc2a3834b9379ec77798ca1bcabe434e23fb21fead692", size = 7898932, upload-time = "2026-10-28T19:21:59.366Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5b/e4/b9b9c8eb09e70927ee65b1456cfed35710b6e4ff0b07f364ceaf2202307c/mypy-2.4.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:9d7dafd56179d296651df9e1844b91c9517c379398f017a2a435d077a28943c1", size = 15706623, upload-time = "2026-10-28T19:22:20.528Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/26/74/1ceb1ca884add0565e618d013dd24333039100dc0fcc42661561f2e1cae5/mypy-2.4.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d923cec43316f0e6736b8298fd00abeaaf348a091c20e7296b3aebceecb63eca", size = 15944095, upload-time = "2026-10-28T19:21:04.779Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2b/68/27bcf9b4efa22733b6050485ae37845b94c9b8851abe4fc60632d905c32d/mypy-2.4.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6e081b466e88d4343adffe11aff0f02df34b5b9070b4b700053a0b7294c0be1", size = 17223065, upload-time = "2026-10-28T19:23:03.724Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1a/a3/ed5724b317bf585c29f3c8be2792e97d45925d65a9c8af40ceeb267072e6/mypy-2.4.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:70196470ac300f444a302a738541101893c2c57804078b33690286a7899149e9", size = 17560589, upload-time = "2026-10-28T19:21:34.539Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/21/5c/6e8010f8f2c4ad817364592d4b3883633417269b913fc9d5174fdeb7e565/mypy-2.4.1-py3-none-any.whl", hash = "sha256:1784648d6ec8c2b5465e3f26241b845a0b3cb4e56c993c64abe16989e7698999", size = 2801286, upload-time = "2026-10-28T19:21:19.516Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a4/be/c624d4241484f37dc62839e177ab607a9b8b3e96f0866544ca99e8e41d51/mypy-2.3.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:94f04929f1c44c35fb0061e912087edaf504acede963a4a7d00680bd089d8531", size = 13936739, upload-time = "2026-08-15T03:03:26.475Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/53/84/e3cf72f90dce5960871c82551c8fba6da05fc1018f79be41c047bd126bdd/mypy-2.3.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f5d716048611e85ca9eefb2e1baa5d73ede389b5820ded260ea27c757d667af8", size = 14166460, upload-time = "2026-08-15T03:01:50.565Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4a/ff/6b97d58aa0f79a5ab9b472db1f6d6df1b11a51d74d0c08ab3760d3a613ba/mypy-2.3.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b091a455111214cb5c9d54a57b9618e9a49f9fe2a42e4e1ac86e9d104ed96ce8", size = 15100476, upload-time = "2026-08-15T03:03:12.079Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/da/f0/cbb4b7d2ae3ac635f6b4f2d9b04070b8a92edf50da599d3b39e5ed109001/mypy-2.3.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:df12e20c9efd614738c71b390007ecd0181125afc4ccafca04d78a1d2eed2c01", size = 15347826, upload-time = "2026-08-15T03:03:02.856Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/85/da/d6effc4f808a842d91edc22535dc9e799d2ff6e91449168b7f47a0771f54/mypy-2.3.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a32bbbb940af990d3be0b8af321c7b6815bb1b3b48142fe7459b9cc5f58959ff", size = 14047547, upload-time = "2026-08-15T03:02:57.707Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e4/e6/478229701dab76f26485fc8ff5d6f241f393da22447400bbc56f6946aebe/mypy-2.3.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ff715e45b2231a8e85de1d163d1b42791e4d7aab8f5145f85fee1b710b735aff", size = 14216515, upload-time = "2026-08-15T03:01:26.496Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8d/fe/7c42327a3b21e84681f691982cbfe43f334a3685f3b683b72c376476c4fa/mypy-2.3.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:858fc57d3d91fa728e33e7ad71def60fc6272694607b306cd3292db53ae39080", size = 15307789, upload-time = "2026-08-15T03:03:31.62Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/59/f4/7e597edbe01b5a56fa958ce541302dcaabfed979966f1dffedbea0ea0fc2/mypy-2.3.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:851833db876e7b650f93719c74b7879a08e338979c96054fdfc3bfd90a486355", size = 15548831, upload-time = "2026-08-15T03:03:15.55Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/de/cf/862010ee800ca9c2bd0c4c0dacf0f092e5411824a09b8f97ad4be8fe250e/mypy-2.3.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:114dff494000f18bd10d5d95d84b8567b26da60279ecbe838131841df20e635d", size = 13964542, upload-time = "2026-08-15T03:02:21.43Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/75/5a/3f3a2107b41e3e92e617e25daaee121413b91e9784bea733131ed4fecc5d/mypy-2.3.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c8637731bb5eee3671eb2c3200827aa3564ed8a9309ecee4d1afe77e6d031bdb", size = 14168922, upload-time = "2026-08-15T03:03:00.351Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8b/41/04dc4fe7e63d7820fa4eff272e95157d30cbea921388f3ab3fe77794cd0b/mypy-2.3.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c80fbc405ed8020f5ff3802dc18cf060197bcdd3fbdd6a26ef2fd34dfdd5226", size = 15244791, upload-time = "2026-08-15T03:02:31.089Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/96/fc/c3053b26b9054949285aa868cb6af8c10e7591541cacd79c5dcc06a1fcf9/mypy-2.3.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:84081f538ce27375045c02e3d7f81bd11d853400621ae245d87ce7b6c420ec74", size = 15501627, upload-time = "2026-08-15T03:03:34.128Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/be/c4/42a49d44aeff804edf1b19acce0b49e8bd1a9c57dee9605dd8d980aa43d7/mypy-2.3.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:192abaedf75da1bc0b1cef104927e70ec49c1ef0031cc4825c7ee10a438ed24d", size = 13986778, upload-time = "2026-08-15T03:01:33.69Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/45/13/9331fd2dfed7194d66c5304072894a8be3e51e9deda6863c1eceaa35a43d/mypy-2.3.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bf678dffd16efcda2c15cbd30e9ecc0081388e29ea23687a88e686ed92638dc3", size = 14188467, upload-time = "2026-08-15T03:02:40.554Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/78/f7/f4a34edab45667c5465855dc585a20e87978ffa8aee711445b7239d120c6/mypy-2.3.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e036f06b41630f4c8a1d48f9ac6aa26acc65f8be089973f5519da643318f03f", size = 15225538, upload-time = "2026-08-15T03:03:09.761Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/40/05/534b3590757bd05794f73e07f6666c2a77b8597ffed795c94ce570096aa0/mypy-2.3.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:71af9c8a894e862b58e92abb08e53b05a384a1e5e5d6dc7cda59126211a53d82", size = 15480805, upload-time = "2026-08-15T03:01:41.134Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/55/da/bdfba852e2562f599624af5bb7d29e36b0b4f526f2b8bac85efe0dd1803d/mypy-2.3.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:3c80cd23d85368bdd9f37d5231dfd97d35bcbf5bf41af96ef3a9b078ad1957f9", size = 7761712, upload-time = "2026-08-15T03:02:36.008Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/82/c7/f80f4e46c0b9a00eb5f78a79d49dda8bdf56a5230f7257fb33e76be04da7/mypy-2.3.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e5f1c50bb05b64e2026b52867e8d21106f01313c744a2c4ecc34c90d12e8d6e2", size = 15121308, upload-time = "2026-08-15T03:01:46.053Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5d/74/9b04f17c7074cc5188f02fb63a2ca1d43fedf479e84fe3091c39061a1d7f/mypy-2.3.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:667196b352f4cf304ded4c10f90cfc179263a1acfb3cdcfa984bdfd340d498bc", size = 15536590, upload-time = "2026-08-15T03:01:35.941Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/26/04/c837ef6208e567774e2ed1f863f8ba6ec4817b1b6dd426315e5d559b6ec9/mypy-2.3.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b9c53e395c12cad2c6d4b67d5da7c6057638a132d85c08b73646b18f802a0045", size = 16791074, upload-time = "2026-08-15T03:01:31.073Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/37/68/48730230afa45192d5bd429a6a2ff24a6f8dedda90fdf2b221792b54518f/mypy-2.3.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:18162b128c3f9c703cd35f5537446900b0d21a2549aa7a95d21380d2ef643fb0", size = 17069183, upload-time = "2026-08-15T03:02:28.566Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ee/f7/41e7f2d8117fbc7a7587286162ffe2f688984b69c46ed63cf5f2e4fc3bae/mypy-2.3.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:6f041a6de52c9217ca125e78ba0a335cb7fd98a1c0580978e49ab2b126f70b57", size = 13990694, upload-time = "2026-08-15T03:03:21.919Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/06/85/8f665811a0c8f3bf6fa1d9acd665ec2d97a2bcc453ae68dcd92340941cd6/mypy-2.3.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5159ae60f5dbc3a498af5ba8365505808ac8031bc63f9e00304ad545d40bdd9b", size = 14203518, upload-time = "2026-08-15T03:01:48.455Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2d/82/91b866c8546b120bff83b73a439d90d2d63ef3aff113599e6b8e4d566848/mypy-2.3.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:47a8a7a0a7f6f6e63995c0ac36fa0c07b127413fdc81f0439b7f3dccafd33561", size = 15220224, upload-time = "2026-08-15T03:01:23.577Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c8/78/c226c99208ee40de7c768369fa533f933afa003dfdc606ff021450724e91/mypy-2.3.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:2329c0501293d4e1f33bc15d04d6304d65a1cdda967ee93a05c1e681a3923133", size = 15501512, upload-time = "2026-08-15T03:02:09.453Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a9/e7/7cfb3f106c393979f4cc37ad6c0586044d50401e3c35b0c003e4f3ba6bc9/mypy-2.3.1-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:bb26deed807bdb0457cf3e3f1cd7c4a1cf9d66864eaf1b4a61e06805d4c6b1f9", size = 7761913, upload-time = "2026-08-15T03:01:55.65Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/10/ce/53be21f2d4adfcd26f63f1184a13ed797015ab463853f117e2e11e4d726f/mypy-2.3.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:ef0c6335cda9d807f8193d8ff6204a72bc909fa9882aacbca14f43cdb7188306", size = 15118669, upload-time = "2026-08-15T03:02:51.479Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/62/43/20de757cd42989d291a17fad607742c4c74e875ce5cea00e5a5225020ac1/mypy-2.3.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e598c8c66401d26b150872154a286e6d484cf2789c3bb28a7556806298423021", size = 15545627, upload-time = "2026-08-15T03:03:05.132Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7e/fc/092bdf77ad280eaf501422f0f3b966012b528076cc13e41a774861c907d1/mypy-2.3.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:eda22fd4efa9dcd39331d1dede9b5b8b8a7fd69af07592e778433da98610d29e", size = 16764157, upload-time = "2026-08-15T03:02:23.958Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/94/5c/c94c4d62d909b07f552d0d9356d7acc943825558e602a64822ffa2231536/mypy-2.3.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:2a0ba2e57847849fb0d1fcdabb32786d223095ed8bc121dfe322bcdb3d9c46bc", size = 17073258, upload-time = "2026-08-15T03:02:14.573Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8e/41/9675c7a1e78edecfba0b79e587a52594c56e189368261dc7b3a7fffb9527/mypy-2.3.1-py3-none-any.whl", hash = "sha256:6ed5c7e3419083268e5c9258bd1c1ef91af44a9e89374dbcaf37b775716e72eb", size = 2754338, upload-time = "2026-08-15T03:02:53.4Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2326,11 +2323,11 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "mypy-extensions"
|
||||
version = "1.2.0"
|
||||
version = "1.1.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/d0/6f/43edf3be2748d0e40974a5ee046a8bb4c9961a4bdd3e7d5c6dcbf32d1af6/mypy_extensions-1.2.0.tar.gz", hash = "sha256:c6e275a07f1c2fc096b62940452d0eaa3f3af7de45d704787866240a7c6d5a51", size = 6566, upload-time = "2026-11-03T16:26:33.692Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/b5/99/7b1adac7e97ce7bbda34792dc6e9b2f5cc5cffd1875883f78a818b2a2687/mypy_extensions-1.2.0-py3-none-any.whl", hash = "sha256:993e7a20aa5671eb41a7132cf555af30062da99729601601b9a8382b11cae768", size = 5114, upload-time = "2026-11-03T16:26:32.731Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2758,14 +2755,14 @@ dev = [
|
||||
{ name = "pytest-rerunfailures", specifier = "~=16.4" },
|
||||
{ name = "pytest-sugar" },
|
||||
{ name = "pytest-xdist", specifier = "~=3.8.0" },
|
||||
{ name = "ruff", specifier = "~=0.17.2" },
|
||||
{ name = "ruff", specifier = "~=0.16.1" },
|
||||
{ name = "time-machine", specifier = ">=2.13" },
|
||||
{ name = "zensical", specifier = ">=0.0.51" },
|
||||
]
|
||||
docs = [{ name = "zensical", specifier = ">=0.0.51" }]
|
||||
lint = [
|
||||
{ name = "prek", specifier = ">=0.4.11,<0.6" },
|
||||
{ name = "ruff", specifier = "~=0.17.2" },
|
||||
{ name = "ruff", specifier = "~=0.16.1" },
|
||||
]
|
||||
testing = [
|
||||
{ name = "daphne" },
|
||||
@@ -3349,15 +3346,15 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "pyrefly"
|
||||
version = "1.5.0"
|
||||
version = "1.3.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/6d/1f/8009dc6e412015a031d09c863df2aaa77ba01997aa39087cb3b0d0ab9780/pyrefly-1.5.0.tar.gz", hash = "sha256:46392760dfd8bf80d596d063699e4ac16a475ffc99706122f80d5edc95ec6ab1", size = 7747228, upload-time = "2026-11-19T01:21:16.444Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/4c/7e/082cc1b392318bacfbc087732524f3e089e9e7fe45b7645c4649b6f1f1e9/pyrefly-1.3.1.tar.gz", hash = "sha256:b774f1dfac82867fc16fe2175d80a630e2a72a6835d5b7e492568d6bfb6b05e7", size = 6679145, upload-time = "2026-09-15T05:09:34.49Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/81/cb/da637cf89bcf53c5efc71b154eb1c28c7f484178b1f11b8b89832cccd677/pyrefly-1.5.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e6a6e88d9df33fc74c1669f10e3b34b29713724e1985d6a499338c27366d86f3", size = 16090376, upload-time = "2026-11-19T01:20:30.706Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ee/a5/d97649a1a8309680aa12cf2a7dff83d98f21c505569a7aacac75e4508abb/pyrefly-1.5.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b2519ccfadee65d28b524cce9e5e80ec3493815a7063e136fd6c5ad2ad8b01d3", size = 16524809, upload-time = "2026-11-19T01:20:34.108Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/35/e7/7202653316924f73631d4e309f6e70bf300e16f3b3b20d6bf85a33a9917a/pyrefly-1.5.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e9fcc4ef2709eda35c5b8b262f204db2601ef619f983ce084f26627fdf641b01", size = 17422238, upload-time = "2026-11-19T01:20:55.729Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/99/6f/8c0998eb51c0ecd5f95ef2131733ae29c26b898b1efd5c530942bde4fa1c/pyrefly-1.5.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3fff600f7c43de627390e93e72c4a684c4748a2077feeb1534495d704c24ab85", size = 16770340, upload-time = "2026-11-19T01:21:00.074Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6a/6c/4200df3c896125c090086e2936f7a456d23528e4935208488a357992e7f5/pyrefly-1.5.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:de6f64c7932eaa45327106307dd1cc818f605ddca86545ed56342917420ba4d2", size = 17515449, upload-time = "2026-11-19T01:21:03.808Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/78/24/a31e7de8e0f310c9f0753826d0df8b6a8ff86793941a6bd88ba24b735633/pyrefly-1.3.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:37a1a1fb41e7190fe3964a877875dd809d6ee2887809e2c3d6e5f25a69805bfd", size = 14430773, upload-time = "2026-09-15T05:09:01.67Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/75/e1/022352beb186f36d6213a95a975c42676ee418ff5e730629378d25564c5e/pyrefly-1.3.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45b7650bc651a5a784701f2fb4f579da9a421c4d1b5fd91f9048f4529e46093c", size = 14877762, upload-time = "2026-09-15T05:09:04.767Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/19/d1/84f81b9e32288b5d11c75e006f67e0f6b78b85da575673bd1a21524c8172/pyrefly-1.3.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39d5a17c1ad655e5f93a6e8e0be90b8db28c6015fe07d6ed4e054891c9e14ef8", size = 15440062, upload-time = "2026-09-15T05:09:14.641Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/46/3c/2aa0c5ad6a2957a728bb38cfab70d1e9cafad21b0b1c1d92df74a3cf22bd/pyrefly-1.3.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:c61e9dcf888beb81ca0e0c60ea4442640fdcf2f1f65bfe3d9f5d89b85516eb03", size = 14898534, upload-time = "2026-09-15T05:09:17.823Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/03/5d/2974f249fb2e285f966485719d977c5a2248cc4866403af94d935775ff15/pyrefly-1.3.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:a78eed1c53f37807f0e2997be8edbe833b91eb9915f2cb553a1bdcd599e7105c", size = 15477758, upload-time = "2026-09-15T05:09:20.964Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3843,15 +3840,15 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "ruff"
|
||||
version = "0.17.6"
|
||||
version = "0.16.10"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/df/8e/6929d337aa5380aafc7355f3149f3ccfe55cba5fdd34a045697ebaceb5a0/ruff-0.17.6.tar.gz", hash = "sha256:2b04276561331300325040bdca21460770029ec574d4c479099e39e8ad1ed43c", size = 5374388, upload-time = "2026-11-19T15:56:27.106Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/c4/49/23802c45f093eb14bde54b141d2b2f058edfa63a06db7beed047308cc08f/ruff-0.16.10.tar.gz", hash = "sha256:eff4728c4eaae93f0955cd264d24b2ab348e74bf59986ccf282ba6dc16b3b017", size = 4958724, upload-time = "2026-10-01T18:03:21.697Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/ba/d4/c31391b36c729cd9fafa65b7a52a58850b99afb2b65da6be4263a53302f2/ruff-0.17.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:9fbddc08577592e283c265d865e0182de6e33db185494db7b06290d989d888e5", size = 9580986, upload-time = "2026-11-19T15:55:57.391Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/eb/11/f3032684dcb3a676d7924545153d76fb56f76753e038f2ea650b99c71bdf/ruff-0.17.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:435241c61af5909a022f76219d3d1bf24730dc1bf0acabb5ddf4b569ab3cbb30", size = 10271368, upload-time = "2026-11-19T15:55:59.654Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/be/48/3df7d81249fd69ee6a49519b149fb5d11e13118fd7d0e8d65329a237087b/ruff-0.17.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa3b08254a732acba246891089a152c47c5733dc36b8ecb76ce8602f8326e5e4", size = 10645279, upload-time = "2026-11-19T15:56:09.785Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/98/0a/b477f075a4a94eb541bf1c759a3e72b2a3d6390af7a13a5be0887229f67c/ruff-0.17.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:fb589e032806bb942e4fb526f30b80a1a64112147ed9f1d38cc3de2e255b6f45", size = 10136036, upload-time = "2026-11-19T15:56:13.779Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/81/c7/e09d220818ab146b736d62e0676dad215215d7de0884bbdad9fa075dc7d2/ruff-0.17.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:3db61f5015600543a581b07fa7f6f64afa0eeedefe16034cadd88c4074087582", size = 10760296, upload-time = "2026-11-19T15:56:19.463Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9f/16/1a5a4a2657effe4806110f2b907313802f1367fcdbb29e8122766e407fab/ruff-0.16.10-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3031a4a2e8e7b8a46f70be45f198c35a11ece509a94b80334d8d397a33c67550", size = 9774282, upload-time = "2026-10-01T18:02:41.79Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6e/fb/470085af734da396e68cd80fb0a3e7c109a459716ae59588c0f6fab8a17d/ruff-0.16.10-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:494401c86df4c4c25f69b9419605d944467ee98c42fb6ad405ef4fa40b8fb67d", size = 9920895, upload-time = "2026-10-01T18:02:44.458Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e4/03/17234145f302a645a123e8c3bb2411ecf4669fbc350de3b0d803230a1729/ruff-0.16.10-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f33f43a864a8483eebd160e713336c8bab02c934feaff0a33cf5ccb41546d09a", size = 10387968, upload-time = "2026-10-01T18:02:57.497Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2e/9a/f56b28f3b143bb9e518c34fb89ab191b626bca8b70dbf8af0d2e2d473572/ruff-0.16.10-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:6553498afc35f580f036030795810b9e6bcea31604b0fd9e8d352795473042e3", size = 10012938, upload-time = "2026-10-01T18:03:03.006Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/21/aa/5c9f3b68737c0e4a33a1db5dfab44f7b786d96ca91a7233112ddab1e6dc2/ruff-0.16.10-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:7ae7375f803b5520dc9f546bed7e3a0acb70b91812e9bb4b19927de22f25b77d", size = 10741702, upload-time = "2026-10-01T18:03:10.775Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in new issue
Block a user