diff --git a/backend/main.py b/backend/main.py index 15a327b..9c60da6 100644 --- a/backend/main.py +++ b/backend/main.py @@ -2484,7 +2484,8 @@ async def api_file(vault_name: str, path: str = Query(..., description="Relative # === CSV: render as HTML table === if ext == ".csv": - import csv, io as csv_io + import csv + import io as csv_io reader = csv.reader(csv_io.StringIO(raw)) rows = list(reader) if not rows: diff --git a/backend/version.py b/backend/version.py index 0fcfc67..333034b 100644 --- a/backend/version.py +++ b/backend/version.py @@ -26,13 +26,13 @@ def get_version() -> str: capture_output=True, text=True, timeout=5, + check=False, ) if result.returncode == 0: tag = result.stdout.strip() # git describe returns v1.7.0 or v1.7.0-3-gabc1234 # Remove leading 'v' if present - if tag.startswith("v"): - tag = tag[1:] + tag = tag.removeprefix("v") return tag except (FileNotFoundError, subprocess.TimeoutExpired, OSError): pass