Skip to content

Commit 1eb5aab

Browse files
committed
style(check): fix mypy issues
1 parent ded47cf commit 1eb5aab

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: commitizen/commands/check.py

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

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

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

0 commit comments

Comments
 (0)