55import sys
66
77
8- def mypy_src ():
8+ def mypy_src () -> None :
99 cmd = ["mypy" , "pandas-stubs" , "tests" , "--no-incremental" ]
1010 subprocess .run (cmd , check = True )
1111
1212
13- def pyright_src ():
13+ def pyright_src () -> None :
1414 cmd = ["pyright" ]
1515 subprocess .run (cmd , check = True )
1616
1717
18- def pyright_src_strict ():
18+ def pyright_src_strict () -> None :
1919 cmd = ["pyright" , "--project" , "pyrightconfig-strict.json" ]
2020 subprocess .run (cmd , check = True )
2121
2222
23- def pytest ():
23+ def pytest () -> None :
2424 cmd = ["pytest" , "--cache-clear" ]
2525 subprocess .run (cmd , check = True )
2626
2727
28- def style ():
28+ def style () -> None :
2929 cmd = ["pre-commit" , "run" , "--all-files" , "--verbose" ]
3030 subprocess .run (cmd , check = True )
3131
3232
33- def stubtest (allowlist : str = "" , check_missing : bool = False ):
33+ def stubtest (allowlist : str = "" , check_missing : bool = False ) -> None :
3434 cmd = [
3535 sys .executable ,
3636 "-m" ,
@@ -47,47 +47,47 @@ def stubtest(allowlist: str = "", check_missing: bool = False):
4747 subprocess .run (cmd , check = True )
4848
4949
50- def build_dist ():
50+ def build_dist () -> None :
5151 cmd = ["poetry" , "build" , "-f" , "wheel" ]
5252 subprocess .run (cmd , check = True )
5353
5454
55- def install_dist ():
55+ def install_dist () -> None :
5656 path = sorted (Path ("dist/" ).glob ("pandas_stubs-*.whl" ))[- 1 ]
5757 cmd = [sys .executable , "-m" , "pip" , "install" , "--force-reinstall" , str (path )]
5858 subprocess .run (cmd , check = True )
5959
6060
61- def rename_src ():
61+ def rename_src () -> None :
6262 if Path (r"pandas-stubs" ).exists ():
6363 Path (r"pandas-stubs" ).rename ("_pandas-stubs" )
6464 else :
6565 raise FileNotFoundError ("'pandas-stubs' folder does not exists." )
6666
6767
68- def mypy_dist ():
68+ def mypy_dist () -> None :
6969 cmd = ["mypy" , "tests" , "--no-incremental" ]
7070 subprocess .run (cmd , check = True )
7171
7272
73- def pyright_dist ():
73+ def pyright_dist () -> None :
7474 cmd = ["pyright" , "tests" ]
7575 subprocess .run (cmd , check = True )
7676
7777
78- def uninstall_dist ():
78+ def uninstall_dist () -> None :
7979 cmd = [sys .executable , "-m" , "pip" , "uninstall" , "-y" , "pandas-stubs" ]
8080 subprocess .run (cmd , check = True )
8181
8282
83- def restore_src ():
83+ def restore_src () -> None :
8484 if Path (r"_pandas-stubs" ).exists ():
8585 Path (r"_pandas-stubs" ).rename ("pandas-stubs" )
8686 else :
8787 raise FileNotFoundError ("'_pandas-stubs' folder does not exists." )
8888
8989
90- def nightly_pandas ():
90+ def nightly_pandas () -> None :
9191 cmd = [
9292 sys .executable ,
9393 "-m" ,
@@ -110,13 +110,13 @@ def _get_version_from_pyproject(program: str) -> str:
110110 return version_line .split ('"' )[1 ]
111111
112112
113- def released_pandas ():
113+ def released_pandas () -> None :
114114 version = _get_version_from_pyproject ("pandas" )
115115 cmd = [sys .executable , "-m" , "pip" , "install" , f"pandas=={ version } " ]
116116 subprocess .run (cmd , check = True )
117117
118118
119- def nightly_mypy ():
119+ def nightly_mypy () -> None :
120120 cmd = [
121121 sys .executable ,
122122 "-m" ,
@@ -138,7 +138,7 @@ def nightly_mypy():
138138 )
139139
140140
141- def released_mypy ():
141+ def released_mypy () -> None :
142142 version = _get_version_from_pyproject ("mypy" )
143143 cmd = [sys .executable , "-m" , "pip" , "install" , f"mypy=={ version } " ]
144144 subprocess .run (cmd , check = True )
@@ -152,7 +152,7 @@ def released_mypy():
152152 )
153153
154154
155- def ty ():
155+ def ty () -> None :
156156 cmd = [
157157 "ty" ,
158158 "check" ,
@@ -163,6 +163,6 @@ def ty():
163163 subprocess .run (cmd , check = True )
164164
165165
166- def pyrefly ():
166+ def pyrefly () -> None :
167167 cmd = ["pyrefly" , "check" , "pandas-stubs" ]
168168 subprocess .run (cmd , check = True )
0 commit comments