commitizen 3.30.0__tar.gz → 3.31.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {commitizen-3.30.0 → commitizen-3.31.0}/PKG-INFO +1 -1
- commitizen-3.31.0/commitizen/__version__.py +1 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cli.py +7 -1
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/commands/check.py +4 -2
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/commands/commit.py +7 -6
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/base.py +5 -5
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/customize/customize.py +16 -11
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/defaults.py +1 -1
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/exceptions.py +1 -1
- {commitizen-3.30.0 → commitizen-3.31.0}/pyproject.toml +2 -2
- commitizen-3.30.0/commitizen/__version__.py +0 -1
- {commitizen-3.30.0 → commitizen-3.31.0}/LICENSE +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/__init__.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/__main__.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/bump.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/changelog.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/changelog_formats/__init__.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/changelog_formats/asciidoc.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/changelog_formats/base.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/changelog_formats/markdown.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/changelog_formats/restructuredtext.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/changelog_formats/textile.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cmd.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/commands/__init__.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/commands/bump.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/commands/changelog.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/commands/example.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/commands/info.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/commands/init.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/commands/list_cz.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/commands/schema.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/commands/version.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/config/__init__.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/config/base_config.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/config/json_config.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/config/toml_config.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/config/yaml_config.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/__init__.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/conventional_commits/__init__.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/conventional_commits/conventional_commits.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/conventional_commits/conventional_commits_info.txt +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/customize/__init__.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/customize/customize_info.txt +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/exceptions.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/jira/__init__.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/jira/jira.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/jira/jira_info.txt +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/utils.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/factory.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/git.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/hooks.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/out.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/providers/__init__.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/providers/base_provider.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/providers/cargo_provider.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/providers/commitizen_provider.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/providers/composer_provider.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/providers/npm_provider.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/providers/pep621_provider.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/providers/poetry_provider.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/providers/scm_provider.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/py.typed +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/templates/CHANGELOG.adoc.j2 +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/templates/CHANGELOG.md.j2 +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/templates/CHANGELOG.rst.j2 +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/templates/CHANGELOG.textile.j2 +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/commitizen/version_schemes.py +0 -0
- {commitizen-3.30.0 → commitizen-3.31.0}/docs/README.md +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.31.0"
|
|
@@ -168,6 +168,12 @@ data = {
|
|
|
168
168
|
"default": 0,
|
|
169
169
|
"help": "length limit of the commit message; 0 for no limit",
|
|
170
170
|
},
|
|
171
|
+
{
|
|
172
|
+
"name": ["--"],
|
|
173
|
+
"action": "store_true",
|
|
174
|
+
"dest": "double_dash",
|
|
175
|
+
"help": "Positional arguments separator (recommended)",
|
|
176
|
+
},
|
|
171
177
|
],
|
|
172
178
|
},
|
|
173
179
|
{
|
|
@@ -547,7 +553,7 @@ def commitizen_excepthook(
|
|
|
547
553
|
original_excepthook(type, value, traceback)
|
|
548
554
|
exit_code = value.exit_code
|
|
549
555
|
if exit_code in no_raise:
|
|
550
|
-
exit_code =
|
|
556
|
+
exit_code = ExitCode.EXPECTED_EXIT
|
|
551
557
|
sys.exit(exit_code)
|
|
552
558
|
else:
|
|
553
559
|
original_excepthook(type, value, traceback)
|
|
@@ -54,7 +54,7 @@ class Check:
|
|
|
54
54
|
for arg in (self.commit_msg_file, self.commit_msg, self.rev_range)
|
|
55
55
|
)
|
|
56
56
|
if num_exclusive_args_provided == 0 and not sys.stdin.isatty():
|
|
57
|
-
self.commit_msg
|
|
57
|
+
self.commit_msg = sys.stdin.read()
|
|
58
58
|
elif num_exclusive_args_provided != 1:
|
|
59
59
|
raise InvalidCommandArgumentError(
|
|
60
60
|
"Only one of --rev-range, --message, and --commit-msg-file is permitted by check command! "
|
|
@@ -107,7 +107,9 @@ class Check:
|
|
|
107
107
|
return [git.GitCommit(rev="", title="", body=msg)]
|
|
108
108
|
|
|
109
109
|
# Get commit messages from git log (--rev-range)
|
|
110
|
-
|
|
110
|
+
if self.rev_range:
|
|
111
|
+
return git.get_commits(end=self.rev_range)
|
|
112
|
+
return git.get_commits()
|
|
111
113
|
|
|
112
114
|
@staticmethod
|
|
113
115
|
def _filter_comments(msg: str) -> str:
|
|
@@ -134,17 +134,18 @@ class Commit:
|
|
|
134
134
|
if dry_run:
|
|
135
135
|
raise DryRunExit()
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
always_signoff: bool = self.config.settings["always_signoff"]
|
|
138
|
+
signoff: bool = self.arguments.get("signoff")
|
|
139
|
+
|
|
140
|
+
extra_args = self.arguments.get("extra_cli_args", "")
|
|
140
141
|
|
|
141
142
|
if signoff:
|
|
142
143
|
out.warn(
|
|
143
144
|
"signoff mechanic is deprecated, please use `cz commit -- -s` instead."
|
|
144
145
|
)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
extra_args =
|
|
146
|
+
|
|
147
|
+
if always_signoff or signoff:
|
|
148
|
+
extra_args = f"{extra_args} -s".strip()
|
|
148
149
|
|
|
149
150
|
c = git.commit(m, args=extra_args)
|
|
150
151
|
|
|
@@ -61,7 +61,7 @@ class BaseCommitizen(metaclass=ABCMeta):
|
|
|
61
61
|
template_loader: BaseLoader = PackageLoader("commitizen", "templates")
|
|
62
62
|
template_extras: dict[str, Any] = {}
|
|
63
63
|
|
|
64
|
-
def __init__(self, config: BaseConfig):
|
|
64
|
+
def __init__(self, config: BaseConfig) -> None:
|
|
65
65
|
self.config = config
|
|
66
66
|
if not self.config.settings.get("style"):
|
|
67
67
|
self.config.settings.update({"style": BaseCommitizen.default_style_config})
|
|
@@ -83,19 +83,19 @@ class BaseCommitizen(metaclass=ABCMeta):
|
|
|
83
83
|
]
|
|
84
84
|
)
|
|
85
85
|
|
|
86
|
-
def example(self) -> str
|
|
86
|
+
def example(self) -> str:
|
|
87
87
|
"""Example of the commit message."""
|
|
88
88
|
raise NotImplementedError("Not Implemented yet")
|
|
89
89
|
|
|
90
|
-
def schema(self) -> str
|
|
90
|
+
def schema(self) -> str:
|
|
91
91
|
"""Schema definition of the commit message."""
|
|
92
92
|
raise NotImplementedError("Not Implemented yet")
|
|
93
93
|
|
|
94
|
-
def schema_pattern(self) -> str
|
|
94
|
+
def schema_pattern(self) -> str:
|
|
95
95
|
"""Regex matching the schema used for message validation."""
|
|
96
96
|
raise NotImplementedError("Not Implemented yet")
|
|
97
97
|
|
|
98
|
-
def info(self) -> str
|
|
98
|
+
def info(self) -> str:
|
|
99
99
|
"""Information about the standardized commit message."""
|
|
100
100
|
raise NotImplementedError("Not Implemented yet")
|
|
101
101
|
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
4
6
|
from jinja2 import Template
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
else:
|
|
8
|
+
try:
|
|
9
|
+
from jinja2 import Template
|
|
10
|
+
except ImportError:
|
|
11
|
+
from string import Template
|
|
7
12
|
|
|
8
13
|
|
|
9
14
|
from commitizen import defaults
|
|
@@ -68,16 +73,16 @@ class CustomizeCommitsCz(BaseCommitizen):
|
|
|
68
73
|
else:
|
|
69
74
|
return message_template.render(**answers)
|
|
70
75
|
|
|
71
|
-
def example(self) -> str
|
|
72
|
-
return self.custom_settings.get("example")
|
|
76
|
+
def example(self) -> str:
|
|
77
|
+
return self.custom_settings.get("example") or ""
|
|
73
78
|
|
|
74
|
-
def schema_pattern(self) -> str
|
|
75
|
-
return self.custom_settings.get("schema_pattern")
|
|
79
|
+
def schema_pattern(self) -> str:
|
|
80
|
+
return self.custom_settings.get("schema_pattern") or ""
|
|
76
81
|
|
|
77
|
-
def schema(self) -> str
|
|
78
|
-
return self.custom_settings.get("schema")
|
|
82
|
+
def schema(self) -> str:
|
|
83
|
+
return self.custom_settings.get("schema") or ""
|
|
79
84
|
|
|
80
|
-
def info(self) -> str
|
|
85
|
+
def info(self) -> str:
|
|
81
86
|
info_path = self.custom_settings.get("info_path")
|
|
82
87
|
info = self.custom_settings.get("info")
|
|
83
88
|
if info_path:
|
|
@@ -86,4 +91,4 @@ class CustomizeCommitsCz(BaseCommitizen):
|
|
|
86
91
|
return content
|
|
87
92
|
elif info:
|
|
88
93
|
return info
|
|
89
|
-
return
|
|
94
|
+
return ""
|
|
@@ -45,7 +45,7 @@ class Settings(TypedDict, total=False):
|
|
|
45
45
|
changelog_merge_prerelease: bool
|
|
46
46
|
update_changelog_on_bump: bool
|
|
47
47
|
use_shortcuts: bool
|
|
48
|
-
style: list[tuple[str, str]]
|
|
48
|
+
style: list[tuple[str, str]]
|
|
49
49
|
customize: CzSettings
|
|
50
50
|
major_version_zero: bool
|
|
51
51
|
pre_bump_hooks: list[str] | None
|
|
@@ -42,7 +42,7 @@ class ExitCode(enum.IntEnum):
|
|
|
42
42
|
class CommitizenException(Exception):
|
|
43
43
|
def __init__(self, *args, **kwargs):
|
|
44
44
|
self.output_method = kwargs.get("output_method") or out.error
|
|
45
|
-
self.exit_code = self.__class__.exit_code
|
|
45
|
+
self.exit_code: ExitCode = self.__class__.exit_code
|
|
46
46
|
if args:
|
|
47
47
|
self.message = args[0]
|
|
48
48
|
elif hasattr(self.__class__, "message"):
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[tool.commitizen]
|
|
2
|
-
version = "3.
|
|
2
|
+
version = "3.31.0"
|
|
3
3
|
tag_format = "v$version"
|
|
4
4
|
version_files = [
|
|
5
5
|
"pyproject.toml:version",
|
|
@@ -9,7 +9,7 @@ version_files = [
|
|
|
9
9
|
|
|
10
10
|
[tool.poetry]
|
|
11
11
|
name = "commitizen"
|
|
12
|
-
version = "3.
|
|
12
|
+
version = "3.31.0"
|
|
13
13
|
description = "Python commitizen client tool"
|
|
14
14
|
authors = ["Santiago Fraire <santiwilly@gmail.com>"]
|
|
15
15
|
license = "MIT"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "3.30.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{commitizen-3.30.0 → commitizen-3.31.0}/commitizen/cz/conventional_commits/conventional_commits.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|