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 #388 - python3.8 type hint compatibility #289

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

jpavlav
Copy link
Contributor

@jpavlav jpavlav commented Jan 29, 2025

This should address the following error when running bump-my-version in a python3.8 environment:

    def is_subpath(parent: Path | str, path: Path | str) -> bool:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

#288

jpavlav and others added 2 commits January 29, 2025 14:50
This should address the following error when running `bump-my-version`
in a `python3.8` environment:

```
    def is_subpath(parent: Path | str, path: Path | str) -> bool:
TypeError: unsupported operand type(s) for |: 'type' and 'type'
```
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.43%. Comparing base (cd2b193) to head (0c67fa6).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #289      +/-   ##
==========================================
- Coverage   93.49%   93.43%   -0.06%     
==========================================
  Files          28       28              
  Lines        1828     1829       +1     
  Branches      284      195      -89     
==========================================
  Hits         1709     1709              
- Misses         91       93       +2     
+ Partials       28       27       -1     
Flag Coverage Δ
python-3.10 93.43% <100.00%> (-0.06%) ⬇️
python-3.11 93.43% <100.00%> (-0.06%) ⬇️
python-3.12 93.43% <100.00%> (-0.06%) ⬇️
python-3.13 93.43% <100.00%> (-0.06%) ⬇️
python-3.9 93.43% <100.00%> (-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 a18e6f3 into callowayproject:master Jan 30, 2025
13 of 17 checks passed
@Aleks-Ya
Copy link

Aleks-Ya commented Feb 2, 2025

Unfortunately, still experiencing this error on bump-my-version 0.31.0:

bump-my-version bump minor -v
Traceback (most recent call last):
  File "/home/aleks/.pyenv/versions/3.9.18/envs/cross-field-highlighter-anki-addon/bin/bump-my-version", line 5, in <module>
    from bumpversion.cli import cli
  File "/home/aleks/.pyenv/versions/3.9.18/envs/cross-field-highlighter-anki-addon/lib/python3.9/site-packages/bumpversion/cli.py", line 18, in <module>
    from bumpversion.show import do_show
  File "/home/aleks/.pyenv/versions/3.9.18/envs/cross-field-highlighter-anki-addon/lib/python3.9/site-packages/bumpversion/show.py", line 13, in <module>
    from bumpversion.scm.models import SCMInfo
  File "/home/aleks/.pyenv/versions/3.9.18/envs/cross-field-highlighter-anki-addon/lib/python3.9/site-packages/bumpversion/scm/models.py", line 72, in <module>
    class SCMTool(Protocol):
  File "/home/aleks/.pyenv/versions/3.9.18/envs/cross-field-highlighter-anki-addon/lib/python3.9/site-packages/bumpversion/scm/models.py", line 85, in SCMTool
    def add_path(self, path: str | Path) -> None:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

Version:

pip show bump-my-version
Name: bump-my-version
Version: 0.31.0

Python:

python -V
Python 3.9.18

@coordt
Copy link
Member

coordt commented Feb 2, 2025

@Aleks-Ya

What I really want to know is how my Python3.9 tests are passing!

Fix incoming.

@Aleks-Ya
Copy link

@coordt , FYI in version bump-my-version-0.32.2 the error has disappeared. Thank you for fix!

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.

3 participants