Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix KeyError in TOML file handling #213

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

coordt
Copy link
Member

@coordt coordt commented Jul 17, 2024

The code has been updated to handle KeyErrors when updating TOML files. If a KeyError is raised, it's now caught and managed depending on the file_change attributes 'ignore_missing_file' or 'ignore_missing_version'. This aims to provide more robust handling of edge cases in TOML files. In addition, a new test case has been added to ensure current version is not required in the configuration.

Fixes #212

The code has been updated to handle KeyErrors when updating TOML files. If a KeyError is raised, it's now caught and managed depending on the file_change attributes 'ignore_missing_file' or 'ignore_missing_version'. This aims to provide more robust handling of edge cases in TOML files. In addition, a new test case has been added to ensure current version is not required in the configuration.

Fixes #212
@coordt coordt linked an issue Jul 17, 2024 that may be closed by this pull request
Copy link

Version hint: patch
Current version: 0.24.2
New version (when merged): 0.24.3

Comment ID: Display the version hint-auto-generated

Copy link

PR Preview Action v1.4.7
🚀 Deployed preview to https://callowayproject.github.io/bump-my-version/pr-preview/pr-213/
on branch gh-pages at 2024-07-17 14:18 UTC

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 94.07%. Comparing base (536c7b1) to head (f3c328a).
Report is 1 commits behind head on master.

Files Patch % Lines
bumpversion/files.py 57.14% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
+ Coverage   94.06%   94.07%   +0.01%     
==========================================
  Files          25       25              
  Lines        1567     1570       +3     
  Branches      311      311              
==========================================
+ Hits         1474     1477       +3     
  Misses         68       68              
  Partials       25       25              
Flag Coverage Δ
python-3.10 94.07% <57.14%> (+0.01%) ⬆️
python-3.11 94.07% <57.14%> (+0.01%) ⬆️
python-3.8 93.98% <42.85%> (-0.06%) ⬇️
python-3.9 93.98% <42.85%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coordt coordt merged commit 609b92c into master Jul 17, 2024
13 of 15 checks passed
@coordt coordt deleted the 212-derive-current-version-from-git-tags branch July 17, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Derive current version from git tags.
1 participant