mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-26 15:07:38 +00:00
Chore: Remove dead code (#14817)
* Chore: remove unused is_file_ext_supported Nothing in production called it, only its own test. * Chore: remove unused Tag.parent_pk It was an alias of tn_parent_id used only by two test asserts, which now use tn_parent_id directly. * Chore: remove unused SanityCheckMessages summary properties has_global_issues was never referenced and total_issue_count was only asserted in tests. The two private issue counters that fed it are removed as well, and the tests assert on has_error and has_warning instead. * Chore: remove unused DocumentViewSet._has_document_permissions It duplicated has_document_operation_permissions and had no callers. * Chore: remove legacy DocumentParser base class Parsers are resolved through the parser registry and ParserProtocol now, and nothing referenced this class. Its now unused imports are removed too. * Chore: remove unused ColorField and DeprecatedColors No serializer used ColorField, and DeprecatedColors was only referenced by it. * Chore: remove unused RtlLanguageException A leftover from the old tesseract parser, nothing referenced it. * Chore: remove unused TASK_WORKERS setting An alias of CELERY_WORKER_CONCURRENCY that nothing read. PAPERLESS_TASK_WORKERS is unchanged. * Chore: remove unused GNUPG_HOME setting Nothing read it. The mail GPG code uses EMAIL_GNUPG_HOME. * Chore: remove unused test helpers Drops the shared_samples_dir fixture, MailAttachmentMock, _SHORT_TEXT and _make_extract_text, none of which any test used.
This commit is contained in:
1 parent
0399008fb7
commit
098694c6e4
14 files changed
+9
-293
No files matched your search
@@ -153,12 +153,6 @@ def fake_progress_manager(
|
||||
return FakeProgressManager
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def shared_samples_dir() -> Path:
|
||||
"""Directory of sample files used by more than one app's tests."""
|
||||
return samples.SHARED_SAMPLES_DIR
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def simple_digital_pdf_file() -> Path:
|
||||
"""One-page PDF with a text layer."""
|
||||
|
||||
Reference in new issue
Block a user