99docs_dir = os .path .join ("_build" , "html" )
1010build_command = ["-b" , "html" , "." , docs_dir ]
1111
12+
1213@nox .session
1314def docs (session ):
1415 session .install ("-e" , "." )
1516 cmd = ["sphinx-build" ]
1617 cmd .extend (build_command + session .posargs )
1718 session .run (* cmd )
1819
20+
1921@nox .session (name = "docs-test" )
2022def docs_test (session ):
2123 """
2224 Same as `docs`, but rebuild everything and fail on warnings for testing
2325 """
2426 session .install ("-e" , "." )
2527 cmd = ["sphinx-build" ]
26- cmd .extend (['-W' , ' --keep-going' , '-E' , '-a' ])
28+ cmd .extend (["-W" , " --keep-going" , "-E" , "-a" ])
2729 cmd .extend (build_command + session .posargs )
2830 session .run (* cmd )
2931
@@ -43,17 +45,15 @@ def docs_live(session):
4345 # well, they're static.
4446 # Include these as the final `filenames` argument
4547
46- AUTOBUILD_INCLUDE = [
47- os .path .join ("_static" , "pyos.css" )
48- ]
48+ AUTOBUILD_INCLUDE = [os .path .join ("_static" , "pyos.css" )]
4949
5050 # ----------------
5151 # Assemble command
5252 cmd = ["sphinx-autobuild" ]
5353 for folder in AUTOBUILD_IGNORE :
5454 cmd .extend (["--ignore" , f"*/{ folder } /*" ])
5555
56- #cmd.extend(build_command)
56+ # cmd.extend(build_command)
5757 cmd .extend (build_command + session .posargs )
5858
5959 # Use positional arguments if we have them
@@ -66,15 +66,14 @@ def docs_live(session):
6666 session .run (* cmd )
6767
6868
69-
7069@nox .session (name = "docs-clean" )
7170def clean_dir (dir_path = docs_dir ):
7271 """
7372 Clean out the docs directory used in the
7473 live build.
7574 """
7675 dir_path = pathlib .Path (dir_path )
77- dir_contents = dir_path .glob ('*' )
76+ dir_contents = dir_path .glob ("*" )
7877
7978 for content in dir_contents :
8079 print (content )
0 commit comments