mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 00:05:21 +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
|
|
@ -269,7 +269,7 @@ class Document(ModelWithOwner):
|
|||
MinValueValidator(ARCHIVE_SERIAL_NUMBER_MIN),
|
||||
],
|
||||
help_text=_(
|
||||
"The position of this document in your physical document " "archive.",
|
||||
"The position of this document in your physical document archive.",
|
||||
),
|
||||
)
|
||||
|
||||
|
|
@ -470,6 +470,9 @@ class SavedViewFilterRule(models.Model):
|
|||
verbose_name = _("filter rule")
|
||||
verbose_name_plural = _("filter rules")
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"SavedViewFilterRule: {self.rule_type} : {self.value}"
|
||||
|
||||
|
||||
# TODO: why is this in the models file?
|
||||
# TODO: how about, what is this and where is it documented?
|
||||
|
|
@ -483,7 +486,7 @@ class FileInfo:
|
|||
(
|
||||
"created-title",
|
||||
re.compile(
|
||||
r"^(?P<created>\d{8}(\d{6})?Z) - " r"(?P<title>.*)$",
|
||||
r"^(?P<created>\d{8}(\d{6})?Z) - (?P<title>.*)$",
|
||||
flags=re.IGNORECASE,
|
||||
),
|
||||
),
|
||||
|
|
@ -634,6 +637,9 @@ class PaperlessTask(models.Model):
|
|||
),
|
||||
)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"Task {self.task_id}"
|
||||
|
||||
|
||||
class Note(models.Model):
|
||||
note = models.TextField(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue