Reformat files with black

This commit is contained in:
Orsiris de Jong 2023-01-27 11:42:05 +01:00
parent e52ac86347
commit 8a52ec7ba5
3 changed files with 11 additions and 6 deletions

View file

@ -64,9 +64,7 @@ def get_private_conf_dist_file():
def compile(arch="64"):
is_private = check_private_build()
OUTPUT_DIR = os.path.join(
BASEDIR, "BUILD" + "-PRIVATE" if is_private else ""
)
OUTPUT_DIR = os.path.join(BASEDIR, "BUILD" + "-PRIVATE" if is_private else "")
if not os.path.isdir(OUTPUT_DIR):
os.makedirs(OUTPUT_DIR)
@ -79,7 +77,9 @@ def compile(arch="64"):
PRODUCT_VERSION = _npbackup_version + ".0"
FILE_VERSION = _npbackup_version + ".0"
file_description = "{} P{}-{}{}".format(FILE_DESCRIPTION, sys.version_info[1], arch, 'priv' if is_private else '')
file_description = "{} P{}-{}{}".format(
FILE_DESCRIPTION, sys.version_info[1], arch, "priv" if is_private else ""
)
restic_source_file = get_restic_internal_binary(arch)
if not restic_source_file:

View file

@ -159,7 +159,7 @@ def _make_treedata_from_json(ls_result: List[dict]) -> sg.TreeData:
for entry in ls_result:
# Make sure we drop the prefix '/' so sg.TreeData does not get an empty root
entry["path"] = entry["path"].lstrip("/")
if os.name == 'nt':
if os.name == "nt":
# On windows, we need to make sure tree keys don't get duplicate because of lower/uppercase
# Shown filenames aren't affected by this
entry["path"] = entry["path"].lower()

View file

@ -27,7 +27,12 @@ import PySimpleGUI as sg
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))
from npbackup.customization import PYSIMPLEGUI_THEME, OEM_ICON, LICENSE_TEXT, LICENSE_FILE
from npbackup.customization import (
PYSIMPLEGUI_THEME,
OEM_ICON,
LICENSE_TEXT,
LICENSE_FILE,
)
import npbackup.configuration as configuration
from npbackup.windows.task import create_scheduled_task
from npbackup.gui.config import config_gui