Format all python with black, and add a .vscode folder

This commit is contained in:
Micah Lee 2021-06-18 18:26:55 -04:00
parent 7a698a0260
commit ad55f02bfb
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
2 changed files with 8 additions and 6 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"python.formatting.provider": "black"
}

View File

@ -551,12 +551,11 @@ class DownloadThread(QtCore.QThread):
self.path = path
# Use tor socks5 proxy, if enabled
if self.common.settings['download_over_tor']:
socks5_address = 'socks5h://{}'.format(self.common.settings['tor_socks_address'])
self.proxies = {
'https': socks5_address,
'http': socks5_address
}
if self.common.settings["download_over_tor"]:
socks5_address = "socks5h://{}".format(
self.common.settings["tor_socks_address"]
)
self.proxies = {"https": socks5_address, "http": socks5_address}
else:
self.proxies = None