@@ -160,6 +160,7 @@ def blacken(session: nox.sessions.Session) -> None:
160
160
# format = isort + black
161
161
#
162
162
163
+
163
164
@nox .session
164
165
def format (session : nox .sessions .Session ) -> None :
165
166
"""
@@ -187,7 +188,9 @@ def _session_tests(
187
188
session : nox .sessions .Session , post_install : Callable = None
188
189
) -> None :
189
190
# 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
+ )
191
194
test_list .extend (glob .glob ("**/tests" , recursive = True ))
192
195
193
196
if len (test_list ) == 0 :
@@ -209,9 +212,7 @@ def _session_tests(
209
212
210
213
if os .path .exists ("requirements-test.txt" ):
211
214
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" )
215
216
else :
216
217
session .install ("-r" , "requirements-test.txt" )
217
218
with open ("requirements-test.txt" ) as rtfile :
@@ -224,9 +225,9 @@ def _session_tests(
224
225
post_install (session )
225
226
226
227
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" ])
228
229
elif "pytest-xdist" in packages :
229
- concurrent_args .extend (['-n' , ' auto' ])
230
+ concurrent_args .extend (["-n" , " auto" ])
230
231
231
232
session .run (
232
233
"pytest" ,
@@ -256,7 +257,7 @@ def py(session: nox.sessions.Session) -> None:
256
257
257
258
258
259
def _get_repo_root () -> Optional [str ]:
259
- """ Returns the root folder of the project. """
260
+ """Returns the root folder of the project."""
260
261
# Get root of this repository. Assume we don't have directories nested deeper than 10 items.
261
262
p = Path (os .getcwd ())
262
263
for i in range (10 ):
0 commit comments