mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-12 00:19:48 +00: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:
@@ -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))
|
||||
|
||||
|
Reference in New Issue
Block a user