File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Expand file tree Collapse file tree 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-
31import re
2+ from typing import Tuple
43
5- name = "histogrammar"
6- __version__ = "1.0.34"
74version = "1.0.34"
8- full_version = "1.0.34"
9- release = True
105
11- version_info = tuple (re .split (r"[-\.]" , __version__ ))
12- specification = "." .join (version_info [:2 ])
136
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 )
1418
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 :
1920 return True
20- elif selfMinor >= otherMinor :
21+ elif self_minor >= other_minor :
2122 return True
2223 else :
2324 return False
You can’t perform that action at this time.
0 commit comments