File tree 1 file changed +14
-13
lines changed 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change 1
- """THIS FILE IS AUTO-GENERATED BY SETUP.PY."""
2
-
3
1
import re
2
+ from typing import Tuple
4
3
5
- name = "histogrammar"
6
- __version__ = "1.0.34"
7
4
version = "1.0.34"
8
- full_version = "1.0.34"
9
- release = True
10
5
11
- version_info = tuple (re .split (r"[-\.]" , __version__ ))
12
- specification = "." .join (version_info [:2 ])
13
6
7
+ def split_version_string (version_string : str ) -> Tuple [int , int ]:
8
+ version_numbers = list (map (int , re .split (r"[-.]" , version_string )))
9
+ return version_numbers [0 ], version_numbers [1 ]
10
+
11
+
12
+ specification = "." .join ([str (i ) for i in split_version_string (version )[:2 ]])
13
+
14
+
15
+ def compatible (serialized_version : str ) -> bool :
16
+ self_major , self_minor = split_version_string (version )
17
+ other_major , other_minor = split_version_string (serialized_version )
14
18
15
- def compatible (serializedVersion ):
16
- selfMajor , selfMinor = map (int , version_info [:2 ])
17
- otherMajor , otherMinor = map (int , re .split (r"[-\.]" , serializedVersion )[:2 ])
18
- if selfMajor >= otherMajor :
19
+ if self_major >= other_major :
19
20
return True
20
- elif selfMinor >= otherMinor :
21
+ elif self_minor >= other_minor :
21
22
return True
22
23
else :
23
24
return False
You can’t perform that action at this time.
0 commit comments