mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 16:46:50 +01:00
Chore: Change the code formatter to Ruff (#6756)
* Changing the formatting to ruff-format * Replaces references to black to ruff or ruff format, removes black from dependencies
This commit is contained in:
parent
3facdefa40
commit
622f624132
27 changed files with 78 additions and 120 deletions
|
|
@ -25,7 +25,6 @@ logger = logging.getLogger("paperless.bulk_edit")
|
|||
|
||||
|
||||
def set_correspondent(doc_ids: list[int], correspondent):
|
||||
|
||||
if correspondent:
|
||||
correspondent = Correspondent.objects.only("pk").get(id=correspondent)
|
||||
|
||||
|
|
@ -81,7 +80,6 @@ def set_document_type(doc_ids: list[int], document_type):
|
|||
|
||||
|
||||
def add_tag(doc_ids: list[int], tag: int):
|
||||
|
||||
qs = Document.objects.filter(Q(id__in=doc_ids) & ~Q(tags__id=tag)).only("pk")
|
||||
affected_docs = list(qs.values_list("pk", flat=True))
|
||||
|
||||
|
|
@ -97,7 +95,6 @@ def add_tag(doc_ids: list[int], tag: int):
|
|||
|
||||
|
||||
def remove_tag(doc_ids: list[int], tag: int):
|
||||
|
||||
qs = Document.objects.filter(Q(id__in=doc_ids) & Q(tags__id=tag)).only("pk")
|
||||
affected_docs = list(qs.values_list("pk", flat=True))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue