Addon Manager: Black reformat

This commit is contained in:
Chris Hennes
2022-02-18 08:38:57 -06:00
parent f28278dca5
commit d357d59c02
5 changed files with 30 additions and 13 deletions

View File

@@ -178,7 +178,13 @@ if HAVE_QTNETWORK:
# are indepdendent booleans, rather than an enumeration:
count = [noProxyCheck, systemProxyCheck, userProxyCheck].count(True)
if count != 1:
FreeCAD.Console.PrintWarning(translate("AddonsInstaller","Parameter error: mutually exclusive proxy options set. Resetting to default.") + "\n")
FreeCAD.Console.PrintWarning(
translate(
"AddonsInstaller",
"Parameter error: mutually exclusive proxy options set. Resetting to default.",
)
+ "\n"
)
noProxyCheck = True
systemProxyCheck = False
userProxyCheck = False
@@ -186,8 +192,14 @@ if HAVE_QTNETWORK:
pref.SetBool("SystemProxyCheck", systemProxyCheck)
pref.SetBool("UserProxyCheck", userProxyCheck)
if userProxyCheck and not proxy_string:
FreeCAD.Console.PrintWarning(translate("AddonsInstaller","Parameter error: user proxy indicated, but no proxy provided. Resetting to default.") + "\n")
if userProxyCheck and not proxy_string:
FreeCAD.Console.PrintWarning(
translate(
"AddonsInstaller",
"Parameter error: user proxy indicated, but no proxy provided. Resetting to default.",
)
+ "\n"
)
noProxyCheck = True
userProxyCheck = False
pref.SetBool("NoProxyCheck", noProxyCheck)
@@ -211,7 +223,6 @@ if HAVE_QTNETWORK:
else:
print(f"Got {result}, expected 1, 2, or 3.")
app.quit()
if noProxyCheck:
pass