mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-21 05:56:40 +01:00
Configures ruff as the one stop linter and resolves warnings it raised
This commit is contained in:
parent
5869467db3
commit
ce41ac9158
110 changed files with 507 additions and 491 deletions
|
|
@ -104,7 +104,7 @@ class DocumentClassifier:
|
|||
self.document_type_classifier = pickle.load(f)
|
||||
self.storage_path_classifier = pickle.load(f)
|
||||
except Exception as err:
|
||||
raise ClassifierModelCorruptError() from err
|
||||
raise ClassifierModelCorruptError from err
|
||||
|
||||
# Check for the warning about unpickling from differing versions
|
||||
# and consider it incompatible
|
||||
|
|
@ -117,7 +117,7 @@ class DocumentClassifier:
|
|||
if issubclass(warning.category, UserWarning):
|
||||
w_msg = str(warning.message)
|
||||
if sk_learn_warning_url in w_msg:
|
||||
raise IncompatibleClassifierVersionError()
|
||||
raise IncompatibleClassifierVersionError
|
||||
|
||||
def save(self):
|
||||
target_file = settings.MODEL_FILE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue