dycw-pre-commit-hooks 0.13.9__py3-none-any.whl → 0.13.10__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.13.9
3
+ Version: 0.13.10
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
@@ -1,4 +1,4 @@
1
- pre_commit_hooks/__init__.py,sha256=7Ekge_xOwFqh5sKr0EdAIN7q3RO-uTyjxHz1A4PS0Qk,59
1
+ pre_commit_hooks/__init__.py,sha256=yBegWc33l3bjoT_uzQTiqmk1N-lBZpAAn4mn2bGI7MY,60
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=Ez1YahjRHTs_PNh82DRnGo3vebZ2BPrvUTNad6YEms4,3436
18
+ pre_commit_hooks/tag_commits/__init__.py,sha256=_gr3jy9Yu8y-B1X3RbS6QLRSlAjEM_GlpILQCIEKX1Y,3614
19
19
  pre_commit_hooks/tag_commits/__main__.py,sha256=qefgYw7LWbvmzZS45-ym6olS4cHqw1Emw2wlqZBXN_o,148
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,,
20
+ dycw_pre_commit_hooks-0.13.10.dist-info/METADATA,sha256=PUIFhm03gBTWsjvkCzPbghGvEVMpAEZBUbcLJwMwULU,1178
21
+ dycw_pre_commit_hooks-0.13.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
22
+ dycw_pre_commit_hooks-0.13.10.dist-info/entry_points.txt,sha256=mpEGGgi0HF_ukOSex2k3_DnActXAj3rMtHv5uwO2sMI,450
23
+ dycw_pre_commit_hooks-0.13.10.dist-info/RECORD,,
@@ -1,3 +1,3 @@
1
1
  from __future__ import annotations
2
2
 
3
- __version__ = "0.13.9"
3
+ __version__ = "0.13.10"
@@ -102,7 +102,7 @@ def _tag_commit(
102
102
  str_ver = str(version)
103
103
  try:
104
104
  existing = repo.tags[str_ver]
105
- except KeyError:
105
+ except IndexError:
106
106
  pass
107
107
  else:
108
108
  repo.delete_tag(existing)
@@ -112,7 +112,11 @@ def _tag_commit(
112
112
  msg = f"Failed to tag {desc}; error creating tag: {error.stderr.strip()}"
113
113
  raise TagCommitsError(msg) from None
114
114
  logger.info(f"Tagging {desc} as {str_ver!r}...")
115
- _ = repo.remotes.origin.push(f"refs/tags/{tag.name}")
115
+ try:
116
+ _ = repo.remotes.origin.push(f"refs/tags/{tag.name}")
117
+ except GitCommandError as error:
118
+ msg = f"Failed to tag {desc}; error pushing tag: {error.stderr.strip()}"
119
+ raise TagCommitsError(msg) from None
116
120
  return True
117
121
 
118
122