Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/nbclassic/_version.py: 100%

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

8 statements  

1""" 

2store the current version info of nbclassic. 

3 

4""" 

5import re 

6 

7# Version string must appear intact for tbump versioning 

8__version__ = '1.2.0.dev0' 

9 

10# Build up version_info tuple for backwards compatibility 

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

12match = re.match(pattern, __version__) 

13parts = [int(match[part]) for part in ['major', 'minor', 'patch']] 

14if match['rest']: 

15 parts.append(match['rest']) 

16version_info = tuple(parts) 

17 

18# Downstream maintainer, when running `python.setup.py jsversion`, 

19# the version string is propagated to the JavaScript files, do not forget to 

20# patch the JavaScript files in `.postN` release done by distributions.