mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
ruff: Fix UP007 Use X | Y for type annotations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
e08a24e47f
commit
531b34cb4c
@@ -1,10 +1,9 @@
|
||||
# System documented in https://zulip.readthedocs.io/en/latest/subsystems/logging.html
|
||||
import os
|
||||
import subprocess
|
||||
from typing import Optional
|
||||
|
||||
|
||||
def try_git_describe() -> Optional[str]:
|
||||
def try_git_describe() -> str | None:
|
||||
try: # nocoverage
|
||||
return subprocess.check_output(
|
||||
["git", "describe", "--tags", "--match=[0-9]*", "--always", "--dirty", "--long"],
|
||||
|
||||
Reference in New Issue
Block a user