mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-20 05:26:53 +01:00
Chore: add pre-commit hook for codespell (#5324)
This commit is contained in:
parent
58bf9c552b
commit
f525ac0af6
33 changed files with 60 additions and 53 deletions
|
|
@ -204,10 +204,10 @@ class DocumentClassifier:
|
|||
) and self.last_auto_type_hash == hasher.digest():
|
||||
return False
|
||||
|
||||
# substract 1 since -1 (null) is also part of the classes.
|
||||
# subtract 1 since -1 (null) is also part of the classes.
|
||||
|
||||
# union with {-1} accounts for cases where all documents have
|
||||
# correspondents and types assigned, so -1 isnt part of labels_x, which
|
||||
# correspondents and types assigned, so -1 isn't part of labels_x, which
|
||||
# it usually is.
|
||||
num_correspondents = len(set(labels_correspondent) | {-1}) - 1
|
||||
num_document_types = len(set(labels_document_type) | {-1}) - 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue