Upgrades black to v23, upgrades ruff

This commit is contained in:
Trenton H
2023-04-25 09:59:24 -07:00
parent 3bcbd05252
commit 6f163111ce
147 changed files with 74 additions and 387 deletions

View File

@@ -9,14 +9,12 @@ from paperless.db import GnuPG
class Command(BaseCommand):
help = (
"This is how you migrate your stored documents from an encrypted "
"state to an unencrypted one (or vice-versa)"
)
def add_arguments(self, parser):
parser.add_argument(
"--passphrase",
help="If PAPERLESS_PASSPHRASE isn't set already, you need to "
@@ -24,7 +22,6 @@ class Command(BaseCommand):
)
def handle(self, *args, **options):
try:
print(
"\n\nWARNING: This script is going to work directly on your "
@@ -49,13 +46,11 @@ class Command(BaseCommand):
@staticmethod
def __gpg_to_unencrypted(passphrase):
encrypted_files = Document.objects.filter(
storage_type=Document.STORAGE_TYPE_GPG,
)
for document in encrypted_files:
print(f"Decrypting {document}".encode())
old_paths = [document.source_path, document.thumbnail_path]