mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
python: Simplify with str.removeprefix, str.removesuffix.
These are available in Python ≥ 3.9. https://docs.python.org/3/library/stdtypes.html#str.removeprefix Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
1ec4539550
commit
91ade25ba3
@@ -16,7 +16,7 @@ from zerver.openapi.openapi import validate_against_openapi_schema
|
||||
def test_js_bindings(client: Client) -> None:
|
||||
os.environ["ZULIP_USERNAME"] = client.email
|
||||
os.environ["ZULIP_API_KEY"] = client.api_key
|
||||
os.environ["ZULIP_REALM"] = client.base_url[:-5]
|
||||
os.environ["ZULIP_REALM"] = client.base_url.removesuffix("/api/")
|
||||
|
||||
output = subprocess.check_output(
|
||||
args=["node", "--unhandled-rejections=strict", "zerver/openapi/javascript_examples.js"],
|
||||
|
||||
Reference in New Issue
Block a user