mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2025-08-14 09:27:21 +08:00
drop python3.6 support
python 3.6 reached end of life on 2021-12-23 Committed via https://github.com/asottile/all-repos
This commit is contained in:
@ -1,16 +1,14 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
from typing import Any
|
||||
from typing import Dict
|
||||
from typing import List
|
||||
from typing import Optional
|
||||
from typing import Sequence
|
||||
from typing import Tuple
|
||||
|
||||
|
||||
def raise_duplicate_keys(
|
||||
ordered_pairs: List[Tuple[str, Any]],
|
||||
) -> Dict[str, Any]:
|
||||
ordered_pairs: list[tuple[str, Any]],
|
||||
) -> dict[str, Any]:
|
||||
d = {}
|
||||
for key, val in ordered_pairs:
|
||||
if key in d:
|
||||
@ -20,7 +18,7 @@ def raise_duplicate_keys(
|
||||
return d
|
||||
|
||||
|
||||
def main(argv: Optional[Sequence[str]] = None) -> int:
|
||||
def main(argv: Sequence[str] | None = None) -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('filenames', nargs='*', help='Filenames to check.')
|
||||
args = parser.parse_args(argv)
|
||||
|
Reference in New Issue
Block a user