dycw-pre-commit-hooks 0.12.3__py3-none-any.whl → 0.12.4__py3-none-any.whl

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.

Potentially problematic release.


This version of dycw-pre-commit-hooks might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dycw-pre-commit-hooks
3
- Version: 0.12.3
3
+ Version: 0.12.4
4
4
  Author-email: Derek Wan <d.wan@icloud.com>
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: click<8.3,>=8.2.1
@@ -1,5 +1,5 @@
1
- pre_commit_hooks/__init__.py,sha256=RyHKY4eur1WrQClEx1VZcd3k4R32k5_2gsEPKMgYMXE,59
2
- pre_commit_hooks/common.py,sha256=OanSspv8rs4OA8u5PVHdS7e0tz_BQ2hHfdKM0poMcx8,2869
1
+ pre_commit_hooks/__init__.py,sha256=Ul915aXNCIEUqkW77kaJBYxPvo2kTfIB8Fya_1sVCTM,59
2
+ pre_commit_hooks/common.py,sha256=LW6OatA5KzfhqnITJq9s1MzNw5t-0zFPqoPW-2VyRm8,2764
3
3
  pre_commit_hooks/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  pre_commit_hooks/format_requirements/__init__.py,sha256=zcvOH839MHGxVNvbBt4KZKDW2MXdtnu6OuxP6P0IqL4,3322
5
5
  pre_commit_hooks/format_requirements/__main__.py,sha256=15JSp_rhjI_Ddoj4MRkHFShfnYxs6GggUhLRlGtrQ0E,156
@@ -9,7 +9,7 @@ pre_commit_hooks/run_bump_my_version/__init__.py,sha256=alaQx34H_pUfJypv9f0UmXIb
9
9
  pre_commit_hooks/run_bump_my_version/__main__.py,sha256=w2V3y61jrSau-zxjl8ciHtWPlJQwXbYxNJ2tGYVyI4s,156
10
10
  pre_commit_hooks/tag_commits/__init__.py,sha256=E9aOurHbD_K3zr8YgBQkiIJo05d2BMUZdecqzz92iJo,3982
11
11
  pre_commit_hooks/tag_commits/__main__.py,sha256=qefgYw7LWbvmzZS45-ym6olS4cHqw1Emw2wlqZBXN_o,148
12
- dycw_pre_commit_hooks-0.12.3.dist-info/METADATA,sha256=AyAWP2a6CTbevtMdYABgRQUap-F7fagsv1h5OESUFuw,1029
13
- dycw_pre_commit_hooks-0.12.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
- dycw_pre_commit_hooks-0.12.3.dist-info/entry_points.txt,sha256=r1tnPzaGvOrSdX-ZRriidf8AhZgUtXfjdTpwpkTBA8U,260
15
- dycw_pre_commit_hooks-0.12.3.dist-info/RECORD,,
12
+ dycw_pre_commit_hooks-0.12.4.dist-info/METADATA,sha256=u20WYX8Q-rs4RXZ1JugnG7rfxYovjpfRpGhn4nhPCAs,1029
13
+ dycw_pre_commit_hooks-0.12.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
+ dycw_pre_commit_hooks-0.12.4.dist-info/entry_points.txt,sha256=r1tnPzaGvOrSdX-ZRriidf8AhZgUtXfjdTpwpkTBA8U,260
15
+ dycw_pre_commit_hooks-0.12.4.dist-info/RECORD,,
@@ -1,3 +1,3 @@
1
1
  from __future__ import annotations
2
2
 
3
- __version__ = "0.12.3"
3
+ __version__ = "0.12.4"
@@ -7,7 +7,6 @@ from click import Choice, option
7
7
  from loguru import logger
8
8
  from tomlkit import TOMLDocument, parse
9
9
  from tomlkit.items import Table
10
- from utilities.pathlib import get_repo_root
11
10
  from utilities.typing import get_literal_elements
12
11
  from utilities.version import Version, parse_version
13
12
 
@@ -65,15 +64,13 @@ def get_version(source: Mode | Path | str | bytes | TOMLDocument, /) -> Version:
65
64
 
66
65
 
67
66
  def get_toml_path(mode: Mode = DEFAULT_MODE, /) -> Path:
68
- root = get_repo_root()
69
67
  match mode:
70
68
  case "pyproject":
71
- filename = "pyproject.toml"
69
+ return Path("pyproject.toml")
72
70
  case "bumpversion":
73
- filename = ".bumpversion.toml"
71
+ return Path(".bumpversion.toml")
74
72
  case never: # pyright: ignore[reportUnnecessaryComparison]
75
73
  assert_never(never)
76
- return root.relative_to(filename)
77
74
 
78
75
 
79
76
  __all__ = ["DEFAULT_MODE", "Mode", "get_toml_path", "get_version", "mode_option"]