33import os
44import re
55import sys
6- from typing import Any , List
6+ from typing import Any
77
88from commitizen import factory , git , out
99from commitizen .config import BaseConfig
@@ -35,7 +35,7 @@ def __init__(self, config: BaseConfig, arguments: dict[str, Any], cwd=os.getcwd(
3535 # we need to distinguish between None and [], which is a valid value
3636
3737 allowed_prefixes = arguments .get ("allowed_prefixes" )
38- self .allowed_prefixes : List [str ] = (
38+ self .allowed_prefixes : list [str ] = (
3939 allowed_prefixes
4040 if allowed_prefixes is not None
4141 else config .settings ["allowed_prefixes" ]
@@ -56,10 +56,8 @@ def _valid_command_argument(self):
5656 self .commit_msg : str | None = sys .stdin .read ()
5757 elif num_exclusive_args_provided != 1 :
5858 raise InvalidCommandArgumentError (
59- (
60- "Only one of --rev-range, --message, and --commit-msg-file is permitted by check command! "
61- "See 'cz check -h' for more information"
62- )
59+ "Only one of --rev-range, --message, and --commit-msg-file is permitted by check command! "
60+ "See 'cz check -h' for more information"
6361 )
6462
6563 def __call__ (self ):
@@ -98,7 +96,7 @@ def _get_commits(self):
9896 # Get commit message from file (--commit-msg-file)
9997 if self .commit_msg_file is not None :
10098 # Enter this branch if commit_msg_file is "".
101- with open (self .commit_msg_file , "r" , encoding = self .encoding ) as commit_file :
99+ with open (self .commit_msg_file , encoding = self .encoding ) as commit_file :
102100 msg = commit_file .read ()
103101 # Get commit message from command line (--message)
104102 elif self .commit_msg is not None :
0 commit comments