33# Attribution-ShareAlike license:
44# http://creativecommons.org/licenses/by-sa/3.0.
55
6- import shutil
76
87import nox
98
@@ -19,10 +18,12 @@ def translation(session):
1918 target_dir = "locales"
2019 session .run (
2120 "sphinx-build" ,
22- "-b" , "gettext" , # build gettext-style message catalogs (.pot file)
23- "-d" , session .cache_dir / ".doctrees" , # path to put the cache
21+ "-b" ,
22+ "gettext" , # build gettext-style message catalogs (.pot file)
23+ "-d" ,
24+ session .cache_dir / ".doctrees" , # path to put the cache
2425 "source/" , # where the rst files are located
25- target_dir , # where to put the .pot file
26+ target_dir , # where to put the .pot file
2627 )
2728
2829
@@ -45,10 +46,14 @@ def build(session, autobuild=False):
4546 )
4647
4748 session .run (
48- command , * extra_args ,
49- "-j" , "auto" , # parallelize the build
50- "-b" , "html" , # use HTML builder
51- "-d" , session .cache_dir / ".doctrees" , # path to put the cache
49+ command ,
50+ * extra_args ,
51+ "-j" ,
52+ "auto" , # parallelize the build
53+ "-b" ,
54+ "html" , # use HTML builder
55+ "-d" ,
56+ session .cache_dir / ".doctrees" , # path to put the cache
5257 "-n" , # nitpicky warn about all missing references
5358 "-W" , # Treat warnings as errors.
5459 * session .posargs ,
@@ -74,12 +79,16 @@ def linkcheck(session):
7479 session .install ("-r" , "requirements.txt" )
7580 session .run (
7681 "sphinx-build" ,
77- "-b" , "linkcheck" , # use linkcheck builder
78- "-d" , session .cache_dir / ".doctrees" , # path to put the cache
82+ "-b" ,
83+ "linkcheck" , # use linkcheck builder
84+ "-d" ,
85+ session .cache_dir / ".doctrees" , # path to put the cache
7986 "--color" ,
80- "-n" , "-W" , "--keep-going" , # be strict
81- "source" , # where the rst files are located
82- "build" , # where to put the check output
87+ "-n" ,
88+ "-W" ,
89+ "--keep-going" , # be strict
90+ "source" , # where the rst files are located
91+ "build" , # where to put the check output
8392 )
8493
8594
0 commit comments