From 19b861808218b0ecb6edb4471bf5369071a0e2d6 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 25 Apr 2024 19:38:35 -0400 Subject: [PATCH] fix --- web_api/s/squawk.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web_api/s/squawk.py b/web_api/s/squawk.py index fe8b5a6b8..8d2476364 100755 --- a/web_api/s/squawk.py +++ b/web_api/s/squawk.py @@ -6,7 +6,6 @@ import subprocess import sys from pathlib import Path -from typing import Optional SQUAWK_VERSION = "0.5.0" APP_LABEL = "web_api" @@ -21,7 +20,7 @@ _MIGRATION_REGEX = re.compile(r"^(\d{4,}_\w+)\.py$") -def _get_migration_id(filepath: str) -> Optional[str]: +def _get_migration_id(filepath: str) -> str | None: """ valid migrations: 0001_initial.py @@ -39,7 +38,7 @@ def _get_migration_id(filepath: str) -> Optional[str]: return match.groups()[0] -def _get_migration_ids() -> list[str]: +def _get_migration_ids() -> list[tuple[str, str | None]]: current_branch = subprocess.run( ["git", "branch", "--show-current"], capture_output=True, check=True )