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 106c294

Browse files
committed
refactor(commands/commit): replace comparison with chained comparison
1 parent 799dc6d commit 106c294

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎commitizen/commands/commit.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def prompt_commit_questions(self) -> str:
6666
message = cz.message(answers)
6767
message_len = len(message.partition("\n")[0].strip())
6868
message_length_limit: int = self.arguments.get("message_length_limit", 0)
69-
if message_length_limit>0andmessage_len>message_length_limit:
69+
if 0<message_length_limit<message_len:
7070
raise CommitMessageLengthExceededError(
7171
f"Length of commit message exceeds limit ({message_len}/{message_length_limit})"
7272
)

0 commit comments

Comments
(0)

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