summaryrefslogtreecommitdiffstats
path: root/pre_commit_hooks/no_commit_to_branch.py
diff options
context:
space:
mode:
Diffstat (limited to 'pre_commit_hooks/no_commit_to_branch.py')
-rw-r--r--pre_commit_hooks/no_commit_to_branch.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pre_commit_hooks/no_commit_to_branch.py b/pre_commit_hooks/no_commit_to_branch.py
index db84850..741f726 100644
--- a/pre_commit_hooks/no_commit_to_branch.py
+++ b/pre_commit_hooks/no_commit_to_branch.py
@@ -1,7 +1,8 @@
+from __future__ import annotations
+
import argparse
import re
from typing import AbstractSet
-from typing import Optional
from typing import Sequence
from pre_commit_hooks.util import CalledProcessError
@@ -23,7 +24,7 @@ def is_on_branch(
)
-def main(argv: Optional[Sequence[str]] = None) -> int:
+def main(argv: Sequence[str] | None = None) -> int:
parser = argparse.ArgumentParser()
parser.add_argument(
'-b', '--branch', action='append',