mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-30 23:08:59 -06:00
Happy Sonar
This commit is contained in:
@@ -5,6 +5,7 @@ import tempfile
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
from typing import Final
|
||||||
|
|
||||||
import magic
|
import magic
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
@@ -49,6 +50,8 @@ from documents.utils import copy_file_with_basic_stats
|
|||||||
from documents.utils import run_subprocess
|
from documents.utils import run_subprocess
|
||||||
from paperless_mail.parsers import MailDocumentParser
|
from paperless_mail.parsers import MailDocumentParser
|
||||||
|
|
||||||
|
LOGGING_NAME: Final[str] = "paperless.consumer"
|
||||||
|
|
||||||
|
|
||||||
class WorkflowTriggerPlugin(
|
class WorkflowTriggerPlugin(
|
||||||
NoCleanupPluginMixin,
|
NoCleanupPluginMixin,
|
||||||
@@ -156,7 +159,7 @@ class ConsumerPlugin(
|
|||||||
ConsumerPluginMixin,
|
ConsumerPluginMixin,
|
||||||
ConsumeTaskPlugin,
|
ConsumeTaskPlugin,
|
||||||
):
|
):
|
||||||
logging_name = "paperless.consumer"
|
logging_name = LOGGING_NAME
|
||||||
|
|
||||||
def run_pre_consume_script(self):
|
def run_pre_consume_script(self):
|
||||||
"""
|
"""
|
||||||
@@ -753,7 +756,7 @@ class ConsumerPreflightPlugin(
|
|||||||
ConsumeTaskPlugin,
|
ConsumeTaskPlugin,
|
||||||
):
|
):
|
||||||
NAME: str = "ConsumerPreflightPlugin"
|
NAME: str = "ConsumerPreflightPlugin"
|
||||||
logging_name = "paperless.consumer"
|
logging_name = LOGGING_NAME
|
||||||
|
|
||||||
def pre_check_file_exists(self):
|
def pre_check_file_exists(self):
|
||||||
"""
|
"""
|
||||||
@@ -852,7 +855,7 @@ class AsnCheckPlugin(
|
|||||||
ConsumeTaskPlugin,
|
ConsumeTaskPlugin,
|
||||||
):
|
):
|
||||||
NAME: str = "AsnCheckPlugin"
|
NAME: str = "AsnCheckPlugin"
|
||||||
logging_name = "paperless.consumer"
|
logging_name = LOGGING_NAME
|
||||||
|
|
||||||
def pre_check_asn_value(self):
|
def pre_check_asn_value(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user