Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a8e970b

Browse files
committed
style: format the code with the latest black and ruff
1 parent e3c6bc9 commit a8e970b

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

commitizen/changelog.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- [x] hook after changelog is generated (api calls)
2525
- [x] add support for change_type maps
2626
"""
27+
2728
from __future__ import annotations
2829

2930
import re

commitizen/cz/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ class BaseCommitizen(metaclass=ABCMeta):
3737
change_type_order: list[str] | None = None
3838

3939
# Executed per message parsed by the commitizen
40-
changelog_message_builder_hook: None | (
41-
Callable[[dict, git.GitCommit], dict]
42-
) = None
40+
changelog_message_builder_hook: None | (Callable[[dict, git.GitCommit], dict]) = (
41+
None
42+
)
4343

4444
# Executed only at the end of the changelog generation
4545
changelog_hook: Callable[[str, str | None], str] | None = None

commitizen/cz/exceptions.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
class CzException(Exception):
2-
...
1+
class CzException(Exception): ...
32

43

5-
class AnswerRequiredError(CzException):
6-
...
4+
class AnswerRequiredError(CzException): ...

tests/test_bump_find_increment.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
CC: Conventional commits
33
SVE: Semantic version at the end
44
"""
5+
56
import pytest
67

78
from commitizen import bump

tests/test_changelog.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1298,9 +1298,9 @@ def test_render_changelog_with_changelog_message_builder_hook(
12981298
gitcommits, tags, any_changelog_format: ChangelogFormat
12991299
):
13001300
def changelog_message_builder_hook(message: dict, commit: git.GitCommit) -> dict:
1301-
message[
1302-
"message"
1303-
] = f"{message['message']} [link](github.com/232323232) {commit.author} {commit.author_email}"
1301+
message["message"] = (
1302+
f"{message['message']} [link](github.com/232323232) {commit.author} {commit.author_email}"
1303+
)
13041304
return message
13051305

13061306
parser = ConventionalCommitsCz.commit_parser

tests/test_cz_customize.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,8 @@ def test_answer_unicode(config_with_unicode):
498498
}
499499
message = cz.message(answers)
500500
assert (
501-
message == "✨ feature: this feature enables customization through a config file"
501+
message
502+
== "✨ feature: this feature enables customization through a config file"
502503
)
503504

504505
cz = CustomizeCommitsCz(config_with_unicode)
@@ -574,7 +575,8 @@ def test_commit_parser(config):
574575
def test_commit_parser_unicode(config_with_unicode):
575576
cz = CustomizeCommitsCz(config_with_unicode)
576577
assert (
577-
cz.commit_parser == "^(?P<change_type>✨ feature|🐛 bug fix):\\s(?P<message>.*)?"
578+
cz.commit_parser
579+
== "^(?P<change_type>✨ feature|🐛 bug fix):\\s(?P<message>.*)?"
578580
)
579581

580582

0 commit comments

Comments
 (0)