From 053feb1e6f78595fed43f3b61899532ea9b45934 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 20 Apr 2019 16:21:58 -0700 Subject: [PATCH] Use AbstractSet to appease mypy --- pre_commit_hooks/no_commit_to_branch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pre_commit_hooks/no_commit_to_branch.py b/pre_commit_hooks/no_commit_to_branch.py index a1015f4..3131059 100644 --- a/pre_commit_hooks/no_commit_to_branch.py +++ b/pre_commit_hooks/no_commit_to_branch.py @@ -2,7 +2,7 @@ from __future__ import print_function import argparse import re -from typing import FrozenSet +from typing import AbstractSet from typing import Optional from typing import Sequence @@ -11,7 +11,7 @@ from pre_commit_hooks.util import cmd_output def is_on_branch(protected, patterns=frozenset()): - # type: (FrozenSet[str], FrozenSet[str]) -> bool + # type: (AbstractSet[str], AbstractSet[str]) -> bool try: ref_name = cmd_output('git', 'symbolic-ref', 'HEAD') except CalledProcessError: