Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/jupyter_core/version.py: 90%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

10 statements  

1""" 

2store the current version info of the jupyter_core. 

3""" 

4from __future__ import annotations 

5 

6import re 

7 

8# Version string must appear intact for hatch versioning 

9__version__ = "5.7.2" 

10 

11# Build up version_info tuple for backwards compatibility 

12pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)" 

13match = re.match(pattern, __version__) 

14assert match is not None 

15parts: list[object] = [int(match[part]) for part in ["major", "minor", "patch"]] 

16if match["rest"]: 

17 parts.append(match["rest"]) 

18version_info = tuple(parts)