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:
Trenton H
2024-05-17 19:26:50 -07:00
committed by GitHub
parent 3facdefa40
commit 622f624132
27 changed files with 78 additions and 120 deletions

View File

@@ -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))