[ci] auto-format

This commit is contained in:
vishal332008 2025-01-23 20:45:05 +00:00 committed by github-actions[bot]
parent 5bb972dd34
commit 5e3013990b
14 changed files with 68 additions and 54 deletions

View file

@ -184,7 +184,7 @@ class DNSBlockWorkaround:
urllib.request.install_opener(opener)
def _resolve_using_google_dns(hostname):
response = urllib.request.urlopen(f"https://dns.google/resolve?name={hostname}")
response = urllib.request.urlopen(f"https: //dns.google/resolve?name={hostname}")
response = response.read()
response = json.loads(response)
resolved_host = response["Answer"][0]["data"]
@ -354,7 +354,8 @@ class StartupTasks:
new_supported_plugins[0:show_max_names])
))
if new_supported_plugins_count == 1:
notification_text = f"{new_supported_plugins_count} new plugin ({new_supported_plugins}) is available!"
notification_text = f"{new_supported_plugins_count} new plugin ({
new_supported_plugins}) is available!"
else:
notification_text = new_supported_plugins + \
('' if new_supported_plugins_count <= show_max_names else ' and +' +
@ -413,7 +414,8 @@ class Category:
self.get_plugins(),
)
except KeyError:
raise CategoryMetadataParseError(f"Failed to parse JSON; missing required fields.")
raise CategoryMetadataParseError(f"Failed to parse JSON
missing required fields.")
else:
return True