@@ -160,6 +160,7 @@ def blacken(session: nox.sessions.Session) -> None:
160160# format = isort + black
161161#
162162
163+
163164@nox .session
164165def format (session : nox .sessions .Session ) -> None :
165166 """
@@ -187,7 +188,9 @@ def _session_tests(
187188 session : nox .sessions .Session , post_install : Callable = None
188189) -> None :
189190 # check for presence of tests
190- test_list = glob .glob ("**/*_test.py" , recursive = True ) + glob .glob ("**/test_*.py" , recursive = True )
191+ test_list = glob .glob ("**/*_test.py" , recursive = True ) + glob .glob (
192+ "**/test_*.py" , recursive = True
193+ )
191194 test_list .extend (glob .glob ("**/tests" , recursive = True ))
192195
193196 if len (test_list ) == 0 :
@@ -209,9 +212,7 @@ def _session_tests(
209212
210213 if os .path .exists ("requirements-test.txt" ):
211214 if os .path .exists ("constraints-test.txt" ):
212- session .install (
213- "-r" , "requirements-test.txt" , "-c" , "constraints-test.txt"
214- )
215+ session .install ("-r" , "requirements-test.txt" , "-c" , "constraints-test.txt" )
215216 else :
216217 session .install ("-r" , "requirements-test.txt" )
217218 with open ("requirements-test.txt" ) as rtfile :
@@ -224,9 +225,9 @@ def _session_tests(
224225 post_install (session )
225226
226227 if "pytest-parallel" in packages :
227- concurrent_args .extend ([' --workers' , ' auto' , ' --tests-per-worker' , ' auto' ])
228+ concurrent_args .extend ([" --workers" , " auto" , " --tests-per-worker" , " auto" ])
228229 elif "pytest-xdist" in packages :
229- concurrent_args .extend (['-n' , ' auto' ])
230+ concurrent_args .extend (["-n" , " auto" ])
230231
231232 session .run (
232233 "pytest" ,
@@ -256,7 +257,7 @@ def py(session: nox.sessions.Session) -> None:
256257
257258
258259def _get_repo_root () -> Optional [str ]:
259- """ Returns the root folder of the project. """
260+ """Returns the root folder of the project."""
260261 # Get root of this repository. Assume we don't have directories nested deeper than 10 items.
261262 p = Path (os .getcwd ())
262263 for i in range (10 ):
0 commit comments