Removing located prints
This commit is contained in:
parent
00ee7e9f0d
commit
2a129945e6
@ -34,7 +34,7 @@ show-fixes = true
|
|||||||
".github/scripts/*.py" = ["E501", "INP001", "SIM117"]
|
".github/scripts/*.py" = ["E501", "INP001", "SIM117"]
|
||||||
"docker/wait-for-redis.py" = ["INP001"]
|
"docker/wait-for-redis.py" = ["INP001"]
|
||||||
"*/tests/*.py" = ["E501", "SIM117"]
|
"*/tests/*.py" = ["E501", "SIM117"]
|
||||||
"*/migrations/*.py" = ["E501", "SIM"]
|
"*/migrations/*.py" = ["E501", "SIM", "T201"]
|
||||||
"src/paperless_tesseract/tests/test_parser.py" = ["RUF001"]
|
"src/paperless_tesseract/tests/test_parser.py" = ["RUF001"]
|
||||||
"src/documents/models.py" = ["SIM115"]
|
"src/documents/models.py" = ["SIM115"]
|
||||||
|
|
||||||
|
@ -90,7 +90,6 @@ def set_suggestions_cache(
|
|||||||
"""
|
"""
|
||||||
if classifier is not None:
|
if classifier is not None:
|
||||||
doc_key = get_suggestion_cache_key(document_id)
|
doc_key = get_suggestion_cache_key(document_id)
|
||||||
print(classifier.last_auto_type_hash)
|
|
||||||
cache.set(
|
cache.set(
|
||||||
doc_key,
|
doc_key,
|
||||||
SuggestionCacheData(
|
SuggestionCacheData(
|
||||||
|
@ -246,8 +246,6 @@ class TestBulkDownload(DirectoriesMixin, APITestCase):
|
|||||||
|
|
||||||
self.doc3.title = "Title 2 - Doc 3"
|
self.doc3.title = "Title 2 - Doc 3"
|
||||||
self.doc3.save()
|
self.doc3.save()
|
||||||
print(self.doc3.archive_path)
|
|
||||||
print(self.doc3.archive_filename)
|
|
||||||
|
|
||||||
response = self.client.post(
|
response = self.client.post(
|
||||||
self.ENDPOINT,
|
self.ENDPOINT,
|
||||||
|
@ -88,10 +88,10 @@ class ConsumerThreadMixin(DocumentConsumeDelayMixin):
|
|||||||
):
|
):
|
||||||
eq = filecmp.cmp(input_doc.original_file, self.sample_file, shallow=False)
|
eq = filecmp.cmp(input_doc.original_file, self.sample_file, shallow=False)
|
||||||
if not eq:
|
if not eq:
|
||||||
print("Consumed an INVALID file.")
|
print("Consumed an INVALID file.") # noqa: T201
|
||||||
raise ConsumerError("Incomplete File READ FAILED")
|
raise ConsumerError("Incomplete File READ FAILED")
|
||||||
else:
|
else:
|
||||||
print("Consumed a perfectly valid file.")
|
print("Consumed a perfectly valid file.") # noqa: T201
|
||||||
|
|
||||||
def slow_write_file(self, target, incomplete=False):
|
def slow_write_file(self, target, incomplete=False):
|
||||||
with open(self.sample_file, "rb") as f:
|
with open(self.sample_file, "rb") as f:
|
||||||
@ -102,11 +102,11 @@ class ConsumerThreadMixin(DocumentConsumeDelayMixin):
|
|||||||
|
|
||||||
with open(target, "wb") as f:
|
with open(target, "wb") as f:
|
||||||
# this will take 2 seconds, since the file is about 20k.
|
# 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):
|
for b in chunked(1000, pdf_bytes):
|
||||||
f.write(b)
|
f.write(b)
|
||||||
sleep(0.1)
|
sleep(0.1)
|
||||||
print("file completed.")
|
print("file completed.") # noqa: T201
|
||||||
|
|
||||||
|
|
||||||
@override_settings(
|
@override_settings(
|
||||||
|
@ -196,7 +196,7 @@ class TestFuzzyMatchCommand(TestCase):
|
|||||||
self.assertEqual(Document.objects.count(), 3)
|
self.assertEqual(Document.objects.count(), 3)
|
||||||
|
|
||||||
stdout, _ = self.call_command("--delete")
|
stdout, _ = self.call_command("--delete")
|
||||||
print(stdout)
|
|
||||||
lines = [x.strip() for x in stdout.split("\n") if len(x.strip())]
|
lines = [x.strip() for x in stdout.split("\n") if len(x.strip())]
|
||||||
self.assertEqual(len(lines), 3)
|
self.assertEqual(len(lines), 3)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
|
@ -340,7 +340,6 @@ class DummyProgressManager:
|
|||||||
def __init__(self, filename: str, task_id: Optional[str] = None) -> None:
|
def __init__(self, filename: str, task_id: Optional[str] = None) -> None:
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
self.task_id = task_id
|
self.task_id = task_id
|
||||||
print("hello world")
|
|
||||||
self.payloads = []
|
self.payloads = []
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
|
@ -35,7 +35,6 @@ class AngularApiAuthenticationOverride(authentication.BaseAuthentication):
|
|||||||
and request.headers["Referer"].startswith("http://localhost:4200/")
|
and request.headers["Referer"].startswith("http://localhost:4200/")
|
||||||
):
|
):
|
||||||
user = User.objects.filter(is_staff=True).first()
|
user = User.objects.filter(is_staff=True).first()
|
||||||
print(f"Auto-Login with user {user}")
|
|
||||||
return (user, None)
|
return (user, None)
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user