commitizen 4.4.0__tar.gz → 4.5.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.
Files changed (70) hide show
  1. {commitizen-4.4.0 → commitizen-4.5.0}/PKG-INFO +23 -2
  2. commitizen-4.5.0/commitizen/__version__.py +1 -0
  3. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/commands/init.py +11 -0
  4. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/tags.py +19 -11
  5. {commitizen-4.4.0 → commitizen-4.5.0}/pyproject.toml +4 -3
  6. commitizen-4.4.0/commitizen/__version__.py +0 -1
  7. {commitizen-4.4.0 → commitizen-4.5.0}/LICENSE +0 -0
  8. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/__init__.py +0 -0
  9. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/__main__.py +0 -0
  10. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/bump.py +0 -0
  11. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/changelog.py +0 -0
  12. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/changelog_formats/__init__.py +0 -0
  13. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/changelog_formats/asciidoc.py +0 -0
  14. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/changelog_formats/base.py +0 -0
  15. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/changelog_formats/markdown.py +0 -0
  16. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/changelog_formats/restructuredtext.py +0 -0
  17. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/changelog_formats/textile.py +0 -0
  18. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cli.py +0 -0
  19. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cmd.py +0 -0
  20. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/commands/__init__.py +0 -0
  21. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/commands/bump.py +0 -0
  22. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/commands/changelog.py +0 -0
  23. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/commands/check.py +0 -0
  24. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/commands/commit.py +0 -0
  25. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/commands/example.py +0 -0
  26. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/commands/info.py +0 -0
  27. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/commands/list_cz.py +0 -0
  28. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/commands/schema.py +0 -0
  29. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/commands/version.py +0 -0
  30. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/config/__init__.py +0 -0
  31. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/config/base_config.py +0 -0
  32. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/config/json_config.py +0 -0
  33. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/config/toml_config.py +0 -0
  34. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/config/yaml_config.py +0 -0
  35. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/__init__.py +0 -0
  36. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/base.py +0 -0
  37. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/conventional_commits/__init__.py +0 -0
  38. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/conventional_commits/conventional_commits.py +0 -0
  39. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/conventional_commits/conventional_commits_info.txt +0 -0
  40. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/customize/__init__.py +0 -0
  41. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/customize/customize.py +0 -0
  42. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/customize/customize_info.txt +0 -0
  43. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/exceptions.py +0 -0
  44. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/jira/__init__.py +0 -0
  45. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/jira/jira.py +0 -0
  46. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/jira/jira_info.txt +0 -0
  47. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/cz/utils.py +0 -0
  48. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/defaults.py +0 -0
  49. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/exceptions.py +0 -0
  50. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/factory.py +0 -0
  51. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/git.py +0 -0
  52. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/hooks.py +0 -0
  53. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/out.py +0 -0
  54. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/providers/__init__.py +0 -0
  55. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/providers/base_provider.py +0 -0
  56. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/providers/cargo_provider.py +0 -0
  57. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/providers/commitizen_provider.py +0 -0
  58. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/providers/composer_provider.py +0 -0
  59. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/providers/npm_provider.py +0 -0
  60. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/providers/pep621_provider.py +0 -0
  61. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/providers/poetry_provider.py +0 -0
  62. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/providers/scm_provider.py +0 -0
  63. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/providers/uv_provider.py +0 -0
  64. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/py.typed +0 -0
  65. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/templates/CHANGELOG.adoc.j2 +0 -0
  66. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/templates/CHANGELOG.md.j2 +0 -0
  67. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/templates/CHANGELOG.rst.j2 +0 -0
  68. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/templates/CHANGELOG.textile.j2 +0 -0
  69. {commitizen-4.4.0 → commitizen-4.5.0}/commitizen/version_schemes.py +0 -0
  70. {commitizen-4.4.0 → commitizen-4.5.0}/docs/README.md +0 -0
@@ -1,8 +1,28 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: commitizen
3
- Version: 4.4.0
3
+ Version: 4.5.0
4
4
  Summary: Python commitizen client tool
5
- License: LICENSE
5
+ License: MIT License
6
+
7
+ Copyright (c) 2017 Santiago
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
6
26
  Keywords: commitizen,conventional,commits,git
7
27
  Author: Santiago Fraire
8
28
  Author-email: santiwilly@gmail.com
@@ -22,6 +42,7 @@ Classifier: Programming Language :: Python :: 3.11
22
42
  Classifier: Programming Language :: Python :: 3.12
23
43
  Classifier: Programming Language :: Python :: 3.13
24
44
  Classifier: Programming Language :: Python :: Implementation :: CPython
45
+ Classifier: License :: OSI Approved :: MIT License
25
46
  Requires-Dist: argcomplete (>=1.12.1,<3.6)
26
47
  Requires-Dist: charset-normalizer (>=2.1.0,<4)
27
48
  Requires-Dist: colorama (>=0.4.1,<1.0)
@@ -0,0 +1 @@
1
+ __version__ = "4.5.0"
@@ -24,6 +24,10 @@ class ProjectInfo:
24
24
  def has_pyproject(self) -> bool:
25
25
  return os.path.isfile("pyproject.toml")
26
26
 
27
+ @property
28
+ def has_uv_lock(self) -> bool:
29
+ return os.path.isfile("uv.lock")
30
+
27
31
  @property
28
32
  def has_setup(self) -> bool:
29
33
  return os.path.isfile("setup.py")
@@ -32,6 +36,10 @@ class ProjectInfo:
32
36
  def has_pre_commit_config(self) -> bool:
33
37
  return os.path.isfile(".pre-commit-config.yaml")
34
38
 
39
+ @property
40
+ def is_python_uv(self) -> bool:
41
+ return self.has_pyproject and self.has_uv_lock
42
+
35
43
  @property
36
44
  def is_python_poetry(self) -> bool:
37
45
  if not self.has_pyproject:
@@ -228,6 +236,7 @@ class Init:
228
236
  "npm": "npm: Get and set version from package.json:project.version field",
229
237
  "pep621": "pep621: Get and set version from pyproject.toml:project.version field",
230
238
  "poetry": "poetry: Get and set version from pyproject.toml:tool.poetry.version field",
239
+ "uv": "uv: Get and Get and set version from pyproject.toml and uv.lock",
231
240
  "scm": "scm: Fetch the version from git and does not need to set it back",
232
241
  }
233
242
 
@@ -235,6 +244,8 @@ class Init:
235
244
  if self.project_info.is_python:
236
245
  if self.project_info.is_python_poetry:
237
246
  default_val = "poetry"
247
+ elif self.project_info.is_python_uv:
248
+ default_val = "uv"
238
249
  else:
239
250
  default_val = "pep621"
240
251
  elif self.project_info.is_rust_cargo:
@@ -8,8 +8,6 @@ from functools import cached_property
8
8
  from string import Template
9
9
  from typing import TYPE_CHECKING, NamedTuple
10
10
 
11
- from typing_extensions import Self
12
-
13
11
  from commitizen import out
14
12
  from commitizen.defaults import DEFAULT_SETTINGS, Settings, get_tag_regexes
15
13
  from commitizen.git import GitTag
@@ -22,8 +20,16 @@ from commitizen.version_schemes import (
22
20
  )
23
21
 
24
22
  if TYPE_CHECKING:
23
+ import sys
24
+
25
25
  from commitizen.version_schemes import VersionScheme
26
26
 
27
+ # Self is Python 3.11+ but backported in typing-extensions
28
+ if sys.version_info < (3, 11):
29
+ from typing_extensions import Self
30
+ else:
31
+ from typing import Self
32
+
27
33
 
28
34
  class VersionTag(NamedTuple):
29
35
  """Represent a version and its matching tag form."""
@@ -49,28 +55,30 @@ class TagRules:
49
55
 
50
56
  Example:
51
57
 
52
- ```py
58
+ ```python
53
59
  settings = DEFAULT_SETTINGS.clone()
54
- settings.update({
55
- "tag_format": "v{version}"
56
- "legacy_tag_formats": ["version{version}", "ver{version}"],
57
- "ignored_tag_formats": ["ignored{version}"],
58
- })
60
+ settings.update(
61
+ {
62
+ "tag_format": "v{version}",
63
+ "legacy_tag_formats": ["version{version}", "ver{version}"],
64
+ "ignored_tag_formats": ["ignored{version}"],
65
+ }
66
+ )
59
67
 
60
68
  rules = TagRules.from_settings(settings)
61
69
 
62
70
  assert rules.is_version_tag("v1.0.0")
63
71
  assert rules.is_version_tag("version1.0.0")
64
72
  assert rules.is_version_tag("ver1.0.0")
65
- assert not rules.is_version_tag("ignored1.0.0", warn=True) # Does not warn
66
- assert not rules.is_version_tag("warn1.0.0", warn=True) # Does warn
73
+ assert not rules.is_version_tag("ignored1.0.0", warn=True) # Does not warn
74
+ assert not rules.is_version_tag("warn1.0.0", warn=True) # Does warn
67
75
 
68
76
  assert rules.search_version("# My v1.0.0 version").version == "1.0.0"
69
77
  assert rules.extract_version("v1.0.0") == Version("1.0.0")
70
78
  try:
71
79
  assert rules.extract_version("not-a-v1.0.0")
72
80
  except InvalidVersion:
73
- print "Does not match a tag format"
81
+ print("Does not match a tag format")
74
82
  ```
75
83
  """
76
84
 
@@ -1,13 +1,13 @@
1
1
  [project]
2
2
  name = "commitizen"
3
- version = "4.4.0"
3
+ version = "4.5.0"
4
4
  description = "Python commitizen client tool"
5
5
  authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }]
6
6
  maintainers = [
7
7
  { name = "Wei Lee", email = "weilee.rx@gmail.com" },
8
8
  { name = "Axel H.", email = "noirbizarre@gmail.com" },
9
9
  ]
10
- license = { text = "LICENSE" }
10
+ license = { file = "LICENSE" }
11
11
  readme = "docs/README.md"
12
12
  requires-python = ">=3.9,<4.0"
13
13
  dependencies = [
@@ -42,6 +42,7 @@ classifiers = [
42
42
  "Programming Language :: Python :: 3.12",
43
43
  "Programming Language :: Python :: 3.13",
44
44
  "Programming Language :: Python :: Implementation :: CPython",
45
+ "License :: OSI Approved :: MIT License",
45
46
  ]
46
47
 
47
48
  [project.urls]
@@ -87,7 +88,7 @@ build-backend = "poetry.core.masonry.api"
87
88
 
88
89
 
89
90
  [tool.commitizen]
90
- version = "4.4.0"
91
+ version = "4.5.0"
91
92
  tag_format = "v$version"
92
93
  version_files = [
93
94
  "pyproject.toml:version",
@@ -1 +0,0 @@
1
- __version__ = "4.4.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes