dycw-pre-commit-hooks 0.13.8__py3-none-any.whl → 0.13.9__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,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dycw-pre-commit-hooks
3
- Version: 0.13.8
3
+ Version: 0.13.9
4
4
  Author-email: Derek Wan <d.wan@icloud.com>
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: click<8.4,>=8.3.0
7
- Requires-Dist: dycw-utilities<0.169,>=0.168.3
7
+ Requires-Dist: dycw-utilities<0.169,>=0.168.8
8
8
  Requires-Dist: gitpython<3.2,>=3.1.45
9
9
  Requires-Dist: libcst<1.9,>=1.8.5
10
10
  Requires-Dist: loguru<0.8,>=0.7.3
@@ -1,4 +1,4 @@
1
- pre_commit_hooks/__init__.py,sha256=ncggm8fiioMLZwiQUgpqfZBgn2bYbBjUXkSf3LU6AuU,59
1
+ pre_commit_hooks/__init__.py,sha256=7Ekge_xOwFqh5sKr0EdAIN7q3RO-uTyjxHz1A4PS0Qk,59
2
2
  pre_commit_hooks/common.py,sha256=ZClypoURLwURWBORPrsEeYYDwWNbRCTVjUwZMIYHNZE,4502
3
3
  pre_commit_hooks/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  pre_commit_hooks/check_submodules_updated/__init__.py,sha256=j-NrV-_l_47meqcMz-QxIUOyWloI3coQXXDKg1Jhwgs,900
@@ -15,9 +15,9 @@ pre_commit_hooks/replace_sequence_str/__init__.py,sha256=IUyhpYh89PF9fX65zYe5Pt3
15
15
  pre_commit_hooks/replace_sequence_str/__main__.py,sha256=B1dxOxngV4vUVnDVrXSywiySOs1P_zF30_4ZMRsOSaY,157
16
16
  pre_commit_hooks/run_bump_my_version/__init__.py,sha256=FhvLQEEoFm21_2c_12Loy_lc8gfNv2wtwAOrdtBEqrs,2028
17
17
  pre_commit_hooks/run_bump_my_version/__main__.py,sha256=w2V3y61jrSau-zxjl8ciHtWPlJQwXbYxNJ2tGYVyI4s,156
18
- pre_commit_hooks/tag_commits/__init__.py,sha256=6HWjXOcTd9gjiZwXmy2lIhZzru-zeRgbpEYxKi1z5sg,3294
18
+ pre_commit_hooks/tag_commits/__init__.py,sha256=Ez1YahjRHTs_PNh82DRnGo3vebZ2BPrvUTNad6YEms4,3436
19
19
  pre_commit_hooks/tag_commits/__main__.py,sha256=qefgYw7LWbvmzZS45-ym6olS4cHqw1Emw2wlqZBXN_o,148
20
- dycw_pre_commit_hooks-0.13.8.dist-info/METADATA,sha256=IC1sWC2OMfQL4qJh9wby0iWtpeVn2LZjcAzEsJ9S_K0,1177
21
- dycw_pre_commit_hooks-0.13.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
22
- dycw_pre_commit_hooks-0.13.8.dist-info/entry_points.txt,sha256=mpEGGgi0HF_ukOSex2k3_DnActXAj3rMtHv5uwO2sMI,450
23
- dycw_pre_commit_hooks-0.13.8.dist-info/RECORD,,
20
+ dycw_pre_commit_hooks-0.13.9.dist-info/METADATA,sha256=uqgOWEOhCSt6gQbnOcgrt8WXQFBD1t-YZ98rfM368lk,1177
21
+ dycw_pre_commit_hooks-0.13.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
22
+ dycw_pre_commit_hooks-0.13.9.dist-info/entry_points.txt,sha256=mpEGGgi0HF_ukOSex2k3_DnActXAj3rMtHv5uwO2sMI,450
23
+ dycw_pre_commit_hooks-0.13.9.dist-info/RECORD,,
@@ -1,3 +1,3 @@
1
1
  from __future__ import annotations
2
2
 
3
- __version__ = "0.13.8"
3
+ __version__ = "0.13.9"
@@ -99,12 +99,19 @@ def _tag_commit(
99
99
  except GetVersionError as error:
100
100
  msg = f"Failed to tag {desc}; error getting veresion: {error.args[0]}"
101
101
  raise TagCommitsError(msg) from None
102
+ str_ver = str(version)
102
103
  try:
103
- tag = repo.create_tag(str(version), ref=sha)
104
+ existing = repo.tags[str_ver]
105
+ except KeyError:
106
+ pass
107
+ else:
108
+ repo.delete_tag(existing)
109
+ try:
110
+ tag = repo.create_tag(str_ver, ref=sha)
104
111
  except GitCommandError as error:
105
112
  msg = f"Failed to tag {desc}; error creating tag: {error.stderr.strip()}"
106
113
  raise TagCommitsError(msg) from None
107
- logger.info(f"Tagging {desc} as {str(version)!r}...")
114
+ logger.info(f"Tagging {desc} as {str_ver!r}...")
108
115
  _ = repo.remotes.origin.push(f"refs/tags/{tag.name}")
109
116
  return True
110
117