mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2025-08-15 01:54:44 +08:00
Use AbstractSet to appease mypy
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user