conventional-pre-commit 4.3.0__tar.gz → 4.4.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 (45) hide show
  1. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/.github/workflows/release.yml +1 -1
  2. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/.github/workflows/tests.yml +1 -1
  3. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/.pre-commit-config.yaml +2 -2
  4. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/PKG-INFO +1 -1
  5. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/conventional_pre_commit/format.py +1 -1
  6. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/conventional_pre_commit.egg-info/PKG-INFO +1 -1
  7. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/test_format.py +11 -8
  8. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/.devcontainer/Dockerfile +0 -0
  9. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/.devcontainer/devcontainer.json +0 -0
  10. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/.dockerignore +0 -0
  11. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/.flake8 +0 -0
  12. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/.github/dependabot.yaml +0 -0
  13. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/.gitignore +0 -0
  14. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/.pre-commit-hooks.yaml +0 -0
  15. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/.vscode/settings.json +0 -0
  16. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/LICENSE +0 -0
  17. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/README.md +0 -0
  18. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/compose.yml +0 -0
  19. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/conventional_pre_commit/__init__.py +0 -0
  20. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/conventional_pre_commit/hook.py +0 -0
  21. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/conventional_pre_commit/output.py +0 -0
  22. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/conventional_pre_commit.egg-info/SOURCES.txt +0 -0
  23. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/conventional_pre_commit.egg-info/dependency_links.txt +0 -0
  24. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/conventional_pre_commit.egg-info/entry_points.txt +0 -0
  25. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/conventional_pre_commit.egg-info/requires.txt +0 -0
  26. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/conventional_pre_commit.egg-info/top_level.txt +0 -0
  27. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/pyproject.toml +0 -0
  28. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/setup.cfg +0 -0
  29. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/__init__.py +0 -0
  30. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/conftest.py +0 -0
  31. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/messages/bad_commit +0 -0
  32. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/messages/conventional_commit +0 -0
  33. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/messages/conventional_commit_bad_multi_line +0 -0
  34. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/messages/conventional_commit_gbk +0 -0
  35. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/messages/conventional_commit_multi_line +0 -0
  36. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/messages/conventional_commit_utf-8 +0 -0
  37. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/messages/conventional_commit_with_dots +0 -0
  38. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/messages/conventional_commit_with_multiple_scopes +0 -0
  39. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/messages/conventional_commit_with_scope +0 -0
  40. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/messages/custom_commit +0 -0
  41. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/messages/fixup_commit +0 -0
  42. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/messages/merge_commit +0 -0
  43. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/run.sh +0 -0
  44. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/test_hook.py +0 -0
  45. {conventional_pre_commit-4.3.0 → conventional_pre_commit-4.4.0}/tests/test_output.py +0 -0
@@ -22,7 +22,7 @@ jobs:
22
22
  id-token: write
23
23
 
24
24
  steps:
25
- - uses: actions/checkout@v5
25
+ - uses: actions/checkout@v6
26
26
 
27
27
  - uses: actions/setup-python@v6
28
28
  with:
@@ -25,7 +25,7 @@ jobs:
25
25
  python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
26
26
 
27
27
  steps:
28
- - uses: actions/checkout@v5
28
+ - uses: actions/checkout@v6
29
29
 
30
30
  - name: Set up Python ${{ matrix.python-version }}
31
31
  uses: actions/setup-python@v6
@@ -18,7 +18,7 @@ repos:
18
18
  - id: check-added-large-files
19
19
 
20
20
  - repo: https://github.com/psf/black-pre-commit-mirror
21
- rev: 25.9.0
21
+ rev: 26.1.0
22
22
  hooks:
23
23
  - id: black
24
24
  types:
@@ -32,7 +32,7 @@ repos:
32
32
  - python
33
33
 
34
34
  - repo: https://github.com/pycqa/bandit
35
- rev: 1.8.6
35
+ rev: 1.9.3
36
36
  hooks:
37
37
  - id: bandit
38
38
  args: ["-ll"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conventional_pre_commit
3
- Version: 4.3.0
3
+ Version: 4.4.0
4
4
  Summary: A pre-commit hook that checks commit messages for Conventional Commits formatting.
5
5
  Author-email: Compiler LLC <dev@compiler.la>
6
6
  License: Apache License
@@ -126,7 +126,7 @@ class ConventionalCommit(Commit):
126
126
  @property
127
127
  def r_scope(self):
128
128
  """Regex str for an optional (scope)."""
129
- escaped_delimiters = list(map(re.escape, [":", ",", "-", "/", "."])) # type: ignore
129
+ escaped_delimiters = list(map(re.escape, [":", ",", "-", "/", ".", "#"])) # type: ignore
130
130
  if self.scopes:
131
131
  scopes = self._r_or(self.scopes)
132
132
  delimiters_pattern = self._r_or(escaped_delimiters)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conventional_pre_commit
3
- Version: 4.3.0
3
+ Version: 4.4.0
4
4
  Summary: A pre-commit hook that checks commit messages for Conventional Commits formatting.
5
5
  Author-email: Compiler LLC <dev@compiler.la>
6
6
  License: Apache License
@@ -444,6 +444,7 @@ def test_r_scope__special_chars(conventional_commit_scope_required):
444
444
  assert regex.match("(some:thing)")
445
445
  assert regex.match("(some,thing)")
446
446
  assert regex.match("(some.thing)")
447
+ assert regex.match("(some#thing)")
447
448
 
448
449
 
449
450
  def test_r_scope__scopes(conventional_commit_scope_required):
@@ -546,12 +547,10 @@ def test_match(conventional_commit):
546
547
 
547
548
 
548
549
  def test_match_multiline(conventional_commit):
549
- match = conventional_commit.match(
550
- """test(scope): subject line
550
+ match = conventional_commit.match("""test(scope): subject line
551
551
 
552
552
  body copy
553
- """
554
- )
553
+ """)
555
554
  assert isinstance(match, re.Match)
556
555
  assert match.group("type") == "test"
557
556
  assert match.group("scope") == "(scope)"
@@ -571,12 +570,10 @@ def test_match_dots(conventional_commit):
571
570
 
572
571
 
573
572
  def test_match_invalid_type(conventional_commit):
574
- match = conventional_commit.match(
575
- """invalid(scope): subject line
573
+ match = conventional_commit.match("""invalid(scope): subject line
576
574
 
577
575
  body copy
578
- """
579
- )
576
+ """)
580
577
  assert isinstance(match, re.Match)
581
578
  assert match.group("type") is None
582
579
  assert match.group("scope") == ""
@@ -649,6 +646,12 @@ def test_is_valid__with_scope(conventional_commit):
649
646
  assert conventional_commit.is_valid(input)
650
647
 
651
648
 
649
+ def test_is_valid__with_scope_and_hash(conventional_commit):
650
+ input = "feat(#scope): message"
651
+
652
+ assert conventional_commit.is_valid(input)
653
+
654
+
652
655
  def test_is_valid__body_multiline_body_bad_type(conventional_commit):
653
656
  input = """wrong: message
654
657