Skip to content

Commit f60e9a2

Browse files
gbaian10Lee-W
authored andcommitted
style(ruff): run ruff check --fix
Auto fix RUF022 and RUF100
1 parent e87d64c commit f60e9a2

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

commitizen/commands/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
__all__ = (
1313
"Bump",
14+
"Changelog",
1415
"Check",
1516
"Commit",
16-
"Changelog",
1717
"Example",
1818
"Info",
19+
"Init",
1920
"ListCz",
2021
"Schema",
2122
"Version",
22-
"Init",
2323
)

commitizen/commands/bump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def find_increment(self, commits: list[git.GitCommit]) -> Increment | None:
135135
)
136136
return bump.find_increment(commits, regex=bump_pattern, increments_map=bump_map)
137137

138-
def __call__(self) -> None: # noqa: C901
138+
def __call__(self) -> None:
139139
"""Steps executed to bump."""
140140
provider = get_provider(self.config)
141141

commitizen/cz/conventional_commits/conventional_commits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ConventionalCommitsCz(BaseCommitizen):
3131
bump_pattern = defaults.BUMP_PATTERN
3232
bump_map = defaults.BUMP_MAP
3333
bump_map_major_version_zero = defaults.BUMP_MAP_MAJOR_VERSION_ZERO
34-
commit_parser = r"^((?P<change_type>feat|fix|refactor|perf|BREAKING CHANGE)(?:\((?P<scope>[^()\r\n]*)\)|\()?(?P<breaking>!)?|\w+!):\s(?P<message>.*)?" # noqa
34+
commit_parser = r"^((?P<change_type>feat|fix|refactor|perf|BREAKING CHANGE)(?:\((?P<scope>[^()\r\n]*)\)|\()?(?P<breaking>!)?|\w+!):\s(?P<message>.*)?"
3535
change_type_map = {
3636
"feat": "Feat",
3737
"fix": "Fix",

commitizen/cz/jira/jira.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def example(self) -> str:
6767
)
6868

6969
def schema(self) -> str:
70-
return "<ignored text> <ISSUE_KEY> <ignored text> #<COMMAND> <optional COMMAND_ARGUMENTS>" # noqa
70+
return "<ignored text> <ISSUE_KEY> <ignored text> #<COMMAND> <optional COMMAND_ARGUMENTS>"
7171

7272
def schema_pattern(self) -> str:
7373
return r".*[A-Z]{2,}\-[0-9]+( #| .* #).+( #.+)*"

commitizen/providers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
from commitizen.providers.uv_provider import UvProvider
2222

2323
__all__ = [
24-
"get_provider",
2524
"CargoProvider",
2625
"CommitizenProvider",
2726
"ComposerProvider",
@@ -30,6 +29,7 @@
3029
"PoetryProvider",
3130
"ScmProvider",
3231
"UvProvider",
32+
"get_provider",
3333
]
3434

3535
PROVIDER_ENTRYPOINT = "commitizen.provider"

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class SemverCommitizen(BaseCommitizen):
169169
"patch": "PATCH",
170170
}
171171
changelog_pattern = r"^(patch|minor|major)"
172-
commit_parser = r"^(?P<change_type>patch|minor|major)(?:\((?P<scope>[^()\r\n]*)\)|\()?:?\s(?P<message>.+)" # noqa
172+
commit_parser = r"^(?P<change_type>patch|minor|major)(?:\((?P<scope>[^()\r\n]*)\)|\()?:?\s(?P<message>.+)"
173173
change_type_map = {
174174
"major": "Breaking Changes",
175175
"minor": "Features",

tests/test_bump_find_increment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
MAJOR_INCREMENTS_BREAKING_CHANGE_CC = [
3333
"feat(cli): added version",
3434
"docs(README): motivation",
35-
"BREAKING CHANGE: `extends` key in config file is now used for extending other config files", # noqa
35+
"BREAKING CHANGE: `extends` key in config file is now used for extending other config files",
3636
"fix(setup.py): future is now required for every python version",
3737
]
3838

3939
MAJOR_INCREMENTS_BREAKING_CHANGE_ALT_CC = [
4040
"feat(cli): added version",
4141
"docs(README): motivation",
42-
"BREAKING-CHANGE: `extends` key in config file is now used for extending other config files", # noqa
42+
"BREAKING-CHANGE: `extends` key in config file is now used for extending other config files",
4343
"fix(setup.py): future is now required for every python version",
4444
]
4545

tests/test_cz_conventional_commits.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def test_long_answer(config):
8989
message = conventional_commits.message(answers)
9090
assert (
9191
message
92-
== "fix(users): email pattern corrected\n\ncomplete content\n\ncloses #24" # noqa
92+
== "fix(users): email pattern corrected\n\ncomplete content\n\ncloses #24"
9393
)
9494

9595

@@ -107,7 +107,7 @@ def test_breaking_change_in_footer(config):
107107
print(message)
108108
assert (
109109
message
110-
== "fix(users): email pattern corrected\n\ncomplete content\n\nBREAKING CHANGE: migrate by renaming user to users" # noqa
110+
== "fix(users): email pattern corrected\n\ncomplete content\n\nBREAKING CHANGE: migrate by renaming user to users"
111111
)
112112

113113

0 commit comments

Comments
 (0)