Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ba16783

Browse files
josixLee-W
authored andcommitted
style(cz_check): Update ill-formatted codes
1 parent 34fca28 commit ba16783

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

‎commitizen/commands/check.py‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,7 @@ def _get_commits(self):
7676
with open(self.commit_msg_file, "r") as commit_file:
7777
commit_title = commit_file.readline()
7878
commit_body = commit_file.read()
79-
return [
80-
git.GitCommit(
81-
rev="",
82-
title=commit_title,
83-
body=commit_body,
84-
)
85-
]
79+
return [git.GitCommit(rev="", title=commit_title, body=commit_body)]
8680

8781
# Get commit messages from git log (--rev-range)
8882
return git.get_commits(end=self.rev_range)

‎tests/commands/test_check_command.py‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,10 @@ def test_check_command_with_empty_range(config, mocker):
211211

212212
def test_check_a_range_of_failed_git_commits(config, mocker):
213213
ill_formated_commits_msgs = [
214-
"First commit does not follow rule",
215-
"Second commit does not follow rule",
216-
(
217-
"Third commit does not follow rule\n"
218-
"Ill-formatted commit with body"
219-
)
220-
]
214+
"First commit does not follow rule",
215+
"Second commit does not follow rule",
216+
("Third commit does not follow rule\n" "Ill-formatted commit with body"),
217+
]
221218
mocker.patch(
222219
"commitizen.git.get_commits",
223220
return_value=_build_fake_git_commits(ill_formated_commits_msgs),

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /