File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,6 @@ select = [
133
133
" PLW" , # pylint warning
134
134
" RUF100" , # Checks noqa rules are used
135
135
" SIM" , # SIMplify
136
- " T20" , # prinT present
137
136
" W" , # Warnings (pycodestyle)
138
137
" UP" , # pyUPgrade
139
138
" YTT" , # Year TwentyTwenty (flake8-2020), sys.version checks
Original file line number Diff line number Diff line change 13
13
AllPlatforms = Literal [SupportedPlatforms , "unsupported" ]
14
14
15
15
raw_platform = platform .system ()
16
+ print (raw_platform )
17
+ print (platform .release ())
16
18
17
19
PLATFORM : AllPlatforms
18
20
19
21
if raw_platform == "Linux" :
20
22
PLATFORM = "WSL" if "microsoft" in platform .release ().lower () else "Linux"
23
+ if PLATFORM == "Linux" :
24
+ pass # python 3.10 print(platform.freedesktop_os_release())
25
+ else :
26
+ pass # python 3.10 print(platform.freedesktop_os_release())
27
+ # platform.release() seems to give kernel version - hence microsoft for WSL?
28
+ extra = platform .release ()
21
29
elif raw_platform == "Darwin" :
22
30
PLATFORM = "MacOS"
31
+ # platform.release() gives kernel version, but this can give OS & architecture
32
+ mac_ver = platform .mac_ver ()
33
+ extra = f"{ mac_ver [0 ]} on { mac_ver [2 ]} "
34
+ elif raw_platform == "Windows" :
35
+ PLATFORM = "unsupported"
36
+ # platform.win32_ver() gives more information as a tuple
37
+ extra = platform .release ()
23
38
else :
24
39
PLATFORM = "unsupported"
40
+ extra = platform .release ()
25
41
26
42
27
43
# PLATFORM DEPENDENT HELPERS
28
44
MOUSE_SELECTION_KEY = "Fn + Alt" if PLATFORM == "MacOS" else "Shift"
29
45
30
46
31
47
def detected_platform () -> str :
48
+ print (extra )
32
49
return PLATFORM
33
50
34
51
You can’t perform that action at this time.
0 commit comments