ci/lint-commit-msg.py: modernize type hint

This commit is contained in:
Kacper Michajłow
2025-10-07 21:19:45 +02:00
parent 3ae5521367
commit e70bb8802f
+1 -2
View File
@@ -5,7 +5,6 @@ import re
import subprocess
import sys
from collections.abc import Callable
from typing import Optional
def call(cmd) -> str:
@@ -22,7 +21,7 @@ def lint_rule(description: str):
lint_rules[func.__name__] = (func, description)
return f
def get_commit_range() -> Optional[str]:
def get_commit_range() -> str | None:
if len(sys.argv) > 1:
return sys.argv[1]
# https://github.com/actions/runner/issues/342#issuecomment-590670059