@@ -38,19 +38,19 @@ def main() -> int:
3838 subprocess .check_call ([
3939 "yapf" , "--in-place" , "--style=style.yapf" , "--recursive" ,
4040 "tests" , "mapry" , "setup.py" , "precommit.py" ],
41- cwd = repo_root . as_posix ( ))
41+ cwd = str ( repo_root ))
4242 # yapf: enable
4343 else :
4444 # yapf: disable
4545 subprocess .check_call ([
4646 "yapf" , "--diff" , "--style=style.yapf" , "--recursive" ,
4747 "tests" , "mapry" , "setup.py" , "precommit.py" ],
48- cwd = repo_root . as_posix ( ))
48+ cwd = str ( repo_root ))
4949 # yapf: enable
5050
5151 print ("Mypy'ing..." )
5252 subprocess .check_call (["mypy" , "--strict" , "mapry" , "tests" ],
53- cwd = repo_root . as_posix ( ))
53+ cwd = str ( repo_root ))
5454
5555 print ("Isort'ing..." )
5656 # yapf: disable
@@ -86,11 +86,11 @@ def main() -> int:
8686 subprocess .check_call (cmd )
8787
8888 print ("Pydocstyle'ing..." )
89- subprocess .check_call (["pydocstyle" , "mapry" ], cwd = repo_root . as_posix ( ))
89+ subprocess .check_call (["pydocstyle" , "mapry" ], cwd = str ( repo_root ))
9090
9191 print ("Pylint'ing..." )
9292 subprocess .check_call (["pylint" , "--rcfile=pylint.rc" , "tests" , "mapry" ],
93- cwd = repo_root . as_posix ( ))
93+ cwd = str ( repo_root ))
9494
9595 print ("Testing..." )
9696 env = os .environ .copy ()
@@ -101,29 +101,29 @@ def main() -> int:
101101 ["coverage" , "run" ,
102102 "--source" , "mapry" ,
103103 "-m" , "unittest" , "discover" , "tests" ],
104- cwd = repo_root . as_posix ( ),
104+ cwd = str ( repo_root ),
105105 env = env )
106106 # yapf: enable
107107
108108 subprocess .check_call (["coverage" , "report" ])
109109
110110 print ("Doctesting..." )
111111 subprocess .check_call (
112- ["python3" , "-m" , "doctest" , (repo_root / "README.rst" ).as_posix ()])
112+ [sys .executable , "-m" , "doctest" ,
113+ str (repo_root / "README.rst" )])
113114
114115 for pth in sorted ((repo_root / "mapry" ).glob ("**/*.py" )):
115- subprocess .check_call (["python3" , "-m" , "doctest" , pth . as_posix ( )])
116+ subprocess .check_call ([sys . executable , "-m" , "doctest" , str ( pth )])
116117
117118 print ("pyicontract-lint'ing..." )
118119 for pth in sorted ((repo_root / "mapry" ).glob ("**/*.py" )):
119- subprocess .check_call (["pyicontract-lint" , pth . as_posix ( )])
120+ subprocess .check_call (["pyicontract-lint" , str ( pth )])
120121
121122 print ("Checking with twine ..." )
122- subprocess .check_call (["python3" , "setup.py" , "sdist" ],
123- cwd = repo_root . as_posix ( ))
123+ subprocess .check_call ([sys . executable , "setup.py" , "sdist" ],
124+ cwd = str ( repo_root ))
124125
125- subprocess .check_call (["twine" , "check" , "dist/*" ],
126- cwd = repo_root .as_posix ())
126+ subprocess .check_call (["twine" , "check" , "dist/*" ], cwd = str (repo_root ))
127127
128128 return 0
129129
0 commit comments