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 authored and GitHub committed 2024-05-18 02:26:50 +00:00
1 parent 3facdefa40
commit 622f624132
27 files changed
+78 -120

No files matched your search

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