adopt ruff as the replacement for python black (#332)

This commit is contained in:
Shuchang Zheng
2024-05-16 18:20:11 -07:00
committed by GitHub
parent 7a2be7e355
commit 2466897158
44 changed files with 1081 additions and 321 deletions

View File

@@ -64,6 +64,18 @@ def streamlit_show_recording(st_obj: Any, uri: str) -> None:
content = read_artifact_safe(uri, is_webm=True) # type: ignore
if content:
random_key = "".join(random.choices(string.ascii_uppercase + string.digits, k=6))
st_obj.download_button("Download recording", content, f"recording{uri.split('/')[-1]}.webm", key=random_key)
st_obj.download_button(
"Download recording",
content,
f"recording{uri.split('/')[-1]}.webm",
key=random_key,
)
streamlit_content_safe(st_obj, st_obj.video, content, "No recording available.", format="video/webm", start_time=0)
streamlit_content_safe(
st_obj,
st_obj.video,
content,
"No recording available.",
format="video/webm",
start_time=0,
)