Galaxy was unable to successfully complete your request
-{}
+{exception}
This may be an intermittent problem due to load or other unpredictable factors, reloading the page may address the problem. - {} + {extra}diff --git a/lib/galaxy/authnz/managers.py b/lib/galaxy/authnz/managers.py index 07ac51f4f809..97bfdebe0c04 100644 --- a/lib/galaxy/authnz/managers.py +++ b/lib/galaxy/authnz/managers.py @@ -67,7 +67,7 @@ def _parse_oidc_config(self, config_file): if root.tag != "OIDC": raise etree.ParseError( "The root element in OIDC_Config xml file is expected to be `OIDC`, " - "found `{}` instead -- unable to continue.".format(root.tag) + f"found `{root.tag}` instead -- unable to continue." ) for child in root: if child.tag != "Setter": @@ -79,7 +79,7 @@ def _parse_oidc_config(self, config_file): if "Property" not in child.attrib or "Value" not in child.attrib or "Type" not in child.attrib: log.error( "Could not find the node attributes `Property` and/or `Value` and/or `Type`;" - " found these attributes: `{}`; skipping this node.".format(child.attrib) + f" found these attributes: `{child.attrib}`; skipping this node." ) continue try: @@ -110,7 +110,7 @@ def _parse_oidc_backends_config(self, config_file): if root.tag != "OIDC": raise etree.ParseError( "The root element in OIDC config xml file is expected to be `OIDC`, " - "found `{}` instead -- unable to continue.".format(root.tag) + f"found `{root.tag}` instead -- unable to continue." ) for child in root: if child.tag != "provider": diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index 894c700e50b6..0641dba25c55 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -604,7 +604,7 @@ def calculate_user_disk_usage_statements(user_id, quota_source_map, for_sqlite=F ) if for_sqlite: # hacky alternative for older sqlite - statement = """ + statement = f""" WITH new (user_id, quota_source_label, disk_usage) AS ( VALUES(:id, :label, ({label_usage})) ) @@ -614,9 +614,7 @@ def calculate_user_disk_usage_statements(user_id, quota_source_map, for_sqlite=F LEFT JOIN user_quota_source_usage AS old ON new.user_id = old.user_id AND new.quota_source_label = old.quota_source_label -""".format( - label_usage=label_usage - ) +""" else: statement = f""" INSERT INTO user_quota_source_usage(user_id, quota_source_label, disk_usage) @@ -996,11 +994,7 @@ def calculate_disk_usage_default_source(self, object_store): exclude_objectstore_ids = quota_source_map.default_usage_excluded_ids() default_cond = "dataset.object_store_id IS NULL OR" if default_quota_enabled and exclude_objectstore_ids else "" default_usage_dataset_condition = ( - ( - "AND ( {default_cond} dataset.object_store_id NOT IN :exclude_object_store_ids )".format( - default_cond=default_cond, - ) - ) + (f"AND ( {default_cond} dataset.object_store_id NOT IN :exclude_object_store_ids )") if exclude_objectstore_ids else "" ) diff --git a/lib/galaxy/quota/__init__.py b/lib/galaxy/quota/__init__.py index dfe9ba4acb22..b78fa0e57aa3 100644 --- a/lib/galaxy/quota/__init__.py +++ b/lib/galaxy/quota/__init__.py @@ -179,16 +179,14 @@ def _default_unregistered_quota(self, quota_source_label): def _default_quota(self, default_type, quota_source_label): label_condition = "IS NULL" if quota_source_label is None else "= :label" query = text( - """ + f""" SELECT bytes FROM quota as default_quota LEFT JOIN default_quota_association on default_quota.id = default_quota_association.quota_id WHERE default_quota_association.type = :default_type AND default_quota.deleted != :is_true AND default_quota.quota_source_label {label_condition} -""".format( - label_condition=label_condition - ) +""" ) conn = self.sa_session.connection() diff --git a/lib/galaxy/web/framework/middleware/error.py b/lib/galaxy/web/framework/middleware/error.py index e94a73894461..99b4c8654c24 100644 --- a/lib/galaxy/web/framework/middleware/error.py +++ b/lib/galaxy/web/framework/middleware/error.py @@ -467,7 +467,7 @@ def send_report(rep, exc_data, html=True): def error_template(head_html, exception, extra): - return """ + return f"""
@@ -476,7 +476,7 @@ def error_template(head_html, exception, extra): .content {{ max-width: 720px; margin: auto; margin-top: 50px; }}{}
+{exception}
This may be an intermittent problem due to load or other unpredictable factors, reloading the page may address the problem. - {} + {extra}