Skip to content

Commit 82db67d

Browse files
committedNov 10, 2024
style(check): fix mypy issues
1 parent c8af618 commit 82db67d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎commitizen/commands/check.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def _valid_command_argument(self):
5454
for arg in (self.commit_msg_file, self.commit_msg, self.rev_range)
5555
)
5656
if num_exclusive_args_provided == 0 and not sys.stdin.isatty():
57-
self.commit_msg: str | None = sys.stdin.read()
57+
self.commit_msg = sys.stdin.read()
5858
elif num_exclusive_args_provided != 1:
5959
raise InvalidCommandArgumentError(
6060
"Only one of --rev-range, --message, and --commit-msg-file is permitted by check command! "
@@ -107,7 +107,9 @@ def _get_commits(self):
107107
return [git.GitCommit(rev="", title="", body=msg)]
108108

109109
# Get commit messages from git log (--rev-range)
110-
return git.get_commits(end=self.rev_range)
110+
if self.rev_range:
111+
return git.get_commits(end=self.rev_range)
112+
return git.get_commits()
111113

112114
@staticmethod
113115
def _filter_comments(msg: str) -> str:

0 commit comments

Comments
 (0)
Please sign in to comment.