mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-06 21:13:43 -05:00
Chore: Adds additional rules for Ruff linter (#5660)
This commit is contained in:
@@ -88,10 +88,10 @@ class ConsumerThreadMixin(DocumentConsumeDelayMixin):
|
||||
):
|
||||
eq = filecmp.cmp(input_doc.original_file, self.sample_file, shallow=False)
|
||||
if not eq:
|
||||
print("Consumed an INVALID file.")
|
||||
print("Consumed an INVALID file.") # noqa: T201
|
||||
raise ConsumerError("Incomplete File READ FAILED")
|
||||
else:
|
||||
print("Consumed a perfectly valid file.")
|
||||
print("Consumed a perfectly valid file.") # noqa: T201
|
||||
|
||||
def slow_write_file(self, target, incomplete=False):
|
||||
with open(self.sample_file, "rb") as f:
|
||||
@@ -102,11 +102,11 @@ class ConsumerThreadMixin(DocumentConsumeDelayMixin):
|
||||
|
||||
with open(target, "wb") as f:
|
||||
# this will take 2 seconds, since the file is about 20k.
|
||||
print("Start writing file.")
|
||||
print("Start writing file.") # noqa: T201
|
||||
for b in chunked(1000, pdf_bytes):
|
||||
f.write(b)
|
||||
sleep(0.1)
|
||||
print("file completed.")
|
||||
print("file completed.") # noqa: T201
|
||||
|
||||
|
||||
@override_settings(
|
||||
|
Reference in New Issue
Block a user