Skip to content

Commit 49d3847

Browse files
authored
Prepare for (pre) release: v1.0.0a6 (#137)
* Fixed error: AttributeError: 'NoneType' object has no attribute 'groups' * Bumping version from 1.0.0a5 to 1.0.0a6
1 parent 4b35178 commit 49d3847

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ description = "Pytest plugin for Celery"
6161
homepage = "https://github.com/celery/pytest-celery"
6262
license = "BSD"
6363
name = "pytest-celery"
64-
version = "1.0.0a5"
64+
version = "1.0.0a6"
6565

6666
[tool.poetry_bumpversion.file."src/pytest_celery/__init__.py"]
6767

src/pytest_celery/__init__.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# flake8: noqa
66

77

8-
__version__ = "1.0.0a5" # pragma: no cover
8+
__version__ = "1.0.0a6" # pragma: no cover
99

1010

1111
import re
@@ -49,7 +49,11 @@
4949

5050
# bumpversion can only search for {current_version}
5151
# so we have to parse the version here.
52-
_temp = re.match(r"(\d+)\.(\d+).(\d+)(.+)?", __version__).groups() # type: ignore
52+
match = re.match(r"(\d+)\.(\d+)\.(\d+)(.+)?", __version__)
53+
if match:
54+
_temp = match.groups()
55+
else:
56+
raise ValueError(f"The version string '{__version__}' does not match the expected pattern.")
5357
VERSION = version_info = version_info_t(int(_temp[0]), int(_temp[1]), int(_temp[2]), _temp[3] or "", "")
5458
del _temp
5559
del re

0 commit comments

Comments
 (0)