File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 66import struct
77import subprocess
88import sys
9+ from typing import List , Optional , Tuple , Union
910
1011from pandas .compat ._optional import VERSIONS , _get_version , import_optional_dependency
1112
1213
13- def get_sys_info ():
14- "Returns system information as a dict "
14+ def get_sys_info () -> List [ Tuple [ str , Optional [ Union [ str , int ]]]] :
15+ "Returns system information as a list "
1516
16- blob = []
17+ blob : List [ Tuple [ str , Optional [ Union [ str , int ]]]] = []
1718
1819 # get full commit hash
1920 commit = None
@@ -29,12 +30,7 @@ def get_sys_info():
2930 pass
3031 else :
3132 if pipe .returncode == 0 :
32- commit = so
33- try :
34- commit = so .decode ("utf-8" )
35- except ValueError :
36- pass
37- commit = commit .strip ().strip ('"' )
33+ commit = so .decode ("utf-8" ).strip ().strip ('"' )
3834
3935 blob .append (("commit" , commit ))
4036
@@ -99,6 +95,7 @@ def show_versions(as_json=False):
9995 mod = import_optional_dependency (
10096 modname , raise_on_missing = False , on_version = "ignore"
10197 )
98+ ver : Optional [str ]
10299 if mod :
103100 ver = _get_version (mod )
104101 else :
You can’t perform that action at this time.
0 commit comments