mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Run pyupgrade
on the files changed on the merge forward
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
623944d2a5
commit
3a128fbd85
2 changed files with 8 additions and 9 deletions
|
@ -31,8 +31,7 @@ def test_salt_versions_report_master(install_salt):
|
|||
ret.stdout.matcher.fnmatch_lines(["*Salt Version:*"])
|
||||
py_version = subprocess.run(
|
||||
[str(python_bin), "--version"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
capture_output=True,
|
||||
).stdout
|
||||
py_version = py_version.decode().strip().replace(" ", ": ")
|
||||
ret.stdout.matcher.fnmatch_lines([f"*{py_version}*"])
|
||||
|
|
|
@ -898,7 +898,7 @@ def hypermedia_handler(*args, **kwargs):
|
|||
|
||||
ret = {
|
||||
"status": cherrypy.response.status,
|
||||
"return": "{}".format(traceback.format_exc())
|
||||
"return": f"{traceback.format_exc()}"
|
||||
if cherrypy.config["debug"]
|
||||
else "An unexpected error occurred",
|
||||
}
|
||||
|
@ -1944,7 +1944,7 @@ class Logout(LowDataAdapter):
|
|||
|
||||
_cp_config = dict(
|
||||
LowDataAdapter._cp_config,
|
||||
**{"tools.salt_auth.on": True, "tools.lowdata_fmt.on": False}
|
||||
**{"tools.salt_auth.on": True, "tools.lowdata_fmt.on": False},
|
||||
)
|
||||
|
||||
def POST(self): # pylint: disable=arguments-differ
|
||||
|
@ -2187,7 +2187,7 @@ class Events:
|
|||
"tools.salt_auth.on": False,
|
||||
"tools.hypermedia_in.on": False,
|
||||
"tools.hypermedia_out.on": False,
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
def __init__(self):
|
||||
|
@ -2392,7 +2392,7 @@ class Events:
|
|||
|
||||
data = next(stream)
|
||||
yield "tag: {}\n".format(data.get("tag", ""))
|
||||
yield "data: {}\n\n".format(salt.utils.json.dumps(data))
|
||||
yield f"data: {salt.utils.json.dumps(data)}\n\n"
|
||||
|
||||
return listen()
|
||||
|
||||
|
@ -2422,7 +2422,7 @@ class WebsocketEndpoint:
|
|||
"tools.hypermedia_out.on": False,
|
||||
"tools.websocket.on": True,
|
||||
"tools.websocket.handler_cls": websockets.SynchronizingWebsocket,
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
def __init__(self):
|
||||
|
@ -2576,7 +2576,7 @@ class WebsocketEndpoint:
|
|||
SaltInfo.process(data, salt_token, self.opts)
|
||||
else:
|
||||
handler.send(
|
||||
"data: {}\n\n".format(salt.utils.json.dumps(data)),
|
||||
f"data: {salt.utils.json.dumps(data)}\n\n",
|
||||
False,
|
||||
)
|
||||
except UnicodeDecodeError:
|
||||
|
@ -2648,7 +2648,7 @@ class Webhook:
|
|||
"tools.lowdata_fmt.on": True,
|
||||
# Auth can be overridden in __init__().
|
||||
"tools.salt_auth.on": True,
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
def __init__(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue