c4urself / bump2version

Version-bump your software with a single command
https://pypi.python.org/pypi/bump2version
MIT License
1.05k stars 134 forks source link

bump2version removed all comments and replaced 4 whitespace with tab in setup.cfg file #220

Closed waynerv closed 3 years ago

waynerv commented 3 years ago

I put [bumpversion] with other tools config in the same setup.cfg file:

[bumpversion]
current_version = 0.1.0
commit = True
tag = True

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:{{ cookiecutter.pkg_name }}/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

[coverage:run]
# uncomment the following to omit files during running
#omit =
[coverage:report]

After executing bump2version command all comments(below [coverage:run]) in setup.cfg was removed,and 4 whitespace before words was replaced with tab:

[bumpversion]
current_version = 0.1.1
commit = True
tag = True

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:python_boilerplate/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

[coverage:run]

[coverage:report]

Is this expected? I think this is annoying because I want to keep those comments.

waynerv commented 3 years ago

I see the same disscusion #185 about this issue,will close this.