pyupgrade: Reformat with --py36-plus.
This includes mainly fixes of string literals using f-strings or .format(...), as well as unpacking of list comprehensions.
This commit is contained in:
parent
e27ac0ddbe
commit
9ce7c52a10
78 changed files with 356 additions and 389 deletions
|
@ -21,7 +21,7 @@ ZULIP_API_KEY = "0123456789abcdef0123456789abcdef"
|
|||
# And similarly for branch "test-post-receive" (for use when testing).
|
||||
def deployment_notice_destination(branch: str) -> Optional[Dict[str, str]]:
|
||||
if branch in ["master", "test-post-receive"]:
|
||||
return dict(stream="deployments", subject="%s" % (branch,))
|
||||
return dict(stream="deployments", subject=f"{branch}")
|
||||
|
||||
# Return None for cases where you don't want a notice sent
|
||||
return None
|
||||
|
@ -46,7 +46,7 @@ def format_deployment_message(
|
|||
dep_id: str = "",
|
||||
dep_time: str = "",
|
||||
) -> str:
|
||||
return "Deployed commit `%s` (%s) in [%s](%s)" % (commit_id, branch, app_name, url)
|
||||
return f"Deployed commit `{commit_id}` ({branch}) in [{app_name}]({url})"
|
||||
|
||||
|
||||
## If properly installed, the Zulip API should be in your import
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue