5
5
import sys
6
6
7
7
8
- def mypy_src ():
8
+ def mypy_src () -> None :
9
9
cmd = ["mypy" , "pandas-stubs" , "tests" , "--no-incremental" ]
10
10
subprocess .run (cmd , check = True )
11
11
12
12
13
- def pyright_src ():
13
+ def pyright_src () -> None :
14
14
cmd = ["pyright" ]
15
15
subprocess .run (cmd , check = True )
16
16
17
17
18
- def pyright_src_strict ():
18
+ def pyright_src_strict () -> None :
19
19
cmd = ["pyright" , "--project" , "pyrightconfig-strict.json" ]
20
20
subprocess .run (cmd , check = True )
21
21
22
22
23
- def pytest ():
23
+ def pytest () -> None :
24
24
cmd = ["pytest" , "--cache-clear" ]
25
25
subprocess .run (cmd , check = True )
26
26
27
27
28
- def style ():
28
+ def style () -> None :
29
29
cmd = ["pre-commit" , "run" , "--all-files" , "--verbose" ]
30
30
subprocess .run (cmd , check = True )
31
31
32
32
33
- def stubtest (allowlist : str = "" , check_missing : bool = False ):
33
+ def stubtest (allowlist : str = "" , check_missing : bool = False ) -> None :
34
34
cmd = [
35
35
sys .executable ,
36
36
"-m" ,
@@ -47,47 +47,47 @@ def stubtest(allowlist: str = "", check_missing: bool = False):
47
47
subprocess .run (cmd , check = True )
48
48
49
49
50
- def build_dist ():
50
+ def build_dist () -> None :
51
51
cmd = ["poetry" , "build" , "-f" , "wheel" ]
52
52
subprocess .run (cmd , check = True )
53
53
54
54
55
- def install_dist ():
55
+ def install_dist () -> None :
56
56
path = sorted (Path ("dist/" ).glob ("pandas_stubs-*.whl" ))[- 1 ]
57
57
cmd = [sys .executable , "-m" , "pip" , "install" , "--force-reinstall" , str (path )]
58
58
subprocess .run (cmd , check = True )
59
59
60
60
61
- def rename_src ():
61
+ def rename_src () -> None :
62
62
if Path (r"pandas-stubs" ).exists ():
63
63
Path (r"pandas-stubs" ).rename ("_pandas-stubs" )
64
64
else :
65
65
raise FileNotFoundError ("'pandas-stubs' folder does not exists." )
66
66
67
67
68
- def mypy_dist ():
68
+ def mypy_dist () -> None :
69
69
cmd = ["mypy" , "tests" , "--no-incremental" ]
70
70
subprocess .run (cmd , check = True )
71
71
72
72
73
- def pyright_dist ():
73
+ def pyright_dist () -> None :
74
74
cmd = ["pyright" , "tests" ]
75
75
subprocess .run (cmd , check = True )
76
76
77
77
78
- def uninstall_dist ():
78
+ def uninstall_dist () -> None :
79
79
cmd = [sys .executable , "-m" , "pip" , "uninstall" , "-y" , "pandas-stubs" ]
80
80
subprocess .run (cmd , check = True )
81
81
82
82
83
- def restore_src ():
83
+ def restore_src () -> None :
84
84
if Path (r"_pandas-stubs" ).exists ():
85
85
Path (r"_pandas-stubs" ).rename ("pandas-stubs" )
86
86
else :
87
87
raise FileNotFoundError ("'_pandas-stubs' folder does not exists." )
88
88
89
89
90
- def nightly_pandas ():
90
+ def nightly_pandas () -> None :
91
91
cmd = [
92
92
sys .executable ,
93
93
"-m" ,
@@ -110,13 +110,13 @@ def _get_version_from_pyproject(program: str) -> str:
110
110
return version_line .split ('"' )[1 ]
111
111
112
112
113
- def released_pandas ():
113
+ def released_pandas () -> None :
114
114
version = _get_version_from_pyproject ("pandas" )
115
115
cmd = [sys .executable , "-m" , "pip" , "install" , f"pandas=={ version } " ]
116
116
subprocess .run (cmd , check = True )
117
117
118
118
119
- def nightly_mypy ():
119
+ def nightly_mypy () -> None :
120
120
cmd = [
121
121
sys .executable ,
122
122
"-m" ,
@@ -138,7 +138,7 @@ def nightly_mypy():
138
138
)
139
139
140
140
141
- def released_mypy ():
141
+ def released_mypy () -> None :
142
142
version = _get_version_from_pyproject ("mypy" )
143
143
cmd = [sys .executable , "-m" , "pip" , "install" , f"mypy=={ version } " ]
144
144
subprocess .run (cmd , check = True )
@@ -152,7 +152,7 @@ def released_mypy():
152
152
)
153
153
154
154
155
- def ty ():
155
+ def ty () -> None :
156
156
cmd = [
157
157
"ty" ,
158
158
"check" ,
@@ -163,6 +163,6 @@ def ty():
163
163
subprocess .run (cmd , check = True )
164
164
165
165
166
- def pyrefly ():
166
+ def pyrefly () -> None :
167
167
cmd = ["pyrefly" , "check" , "pandas-stubs" ]
168
168
subprocess .run (cmd , check = True )
0 commit comments