File tree 1 file changed +6
-9
lines changed
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 6
6
import struct
7
7
import subprocess
8
8
import sys
9
+ from typing import List , Optional , Tuple , Union
9
10
10
11
from pandas .compat ._optional import VERSIONS , _get_version , import_optional_dependency
11
12
12
13
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 "
15
16
16
- blob = []
17
+ blob : List [ Tuple [ str , Optional [ Union [ str , int ]]]] = []
17
18
18
19
# get full commit hash
19
20
commit = None
@@ -29,12 +30,7 @@ def get_sys_info():
29
30
pass
30
31
else :
31
32
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 ('"' )
38
34
39
35
blob .append (("commit" , commit ))
40
36
@@ -99,6 +95,7 @@ def show_versions(as_json=False):
99
95
mod = import_optional_dependency (
100
96
modname , raise_on_missing = False , on_version = "ignore"
101
97
)
98
+ ver : Optional [str ]
102
99
if mod :
103
100
ver = _get_version (mod )
104
101
else :
You can’t perform that action at this time.
0 commit comments