We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd7018e commit 8689546Copy full SHA for 8689546
commitizen/bump.py
@@ -154,7 +154,9 @@ def update_version_in_files(
154
regex = regexes[0] if regexes else None
155
current_version_found = False
156
157
- version_file = open(filepath, "r").read()
+ with open(filepath, "r") as f:
158
+ version_file = f.read()
159
+
160
match = regex and re.search(regex, version_file, re.MULTILINE)
161
if match:
162
left = version_file[: match.end()]
@@ -167,7 +169,7 @@ def update_version_in_files(
167
169
168
170
if not regex:
171
current_version_regex = _version_to_regex(current_version)
- current_version_found = current_version_regex.search(version_file)andTrue
172
+ current_version_found = bool(current_version_regex.search(version_file))
173
version_file = current_version_regex.sub(new_version, version_file)
174
175
if check_consistency and not current_version_found:
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments