Skip to content

Commit 0ec4126

Browse files
committed
Uniformize logging statements
1 parent f6c83cd commit 0ec4126

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/sage_docbuild/builders.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,10 @@ def f(self, *args, **kwds):
171171
if build_options.ABORT_ON_ERROR:
172172
raise Exception("Non-exception during docbuild: %s" % (e,), e)
173173

174-
if "/latex" in output_dir:
175-
logger.warning("LaTeX file written to {}".format(output_dir))
176-
else:
177-
logger.warning(
178-
"Build finished. The built documents can be found in {}".
179-
format(output_dir))
174+
if type == 'latex':
175+
logger.warning(f"LaTeX files can be found in {output_dir}.")
176+
elif type != 'inventory':
177+
logger.warning(f"Build finished. The built documents can be found in {output_dir}.")
180178

181179
f.is_output_format = True
182180
return f
@@ -298,7 +296,7 @@ def pdf(self):
298296

299297
if subprocess.call(make_target % (tex_dir, command, pdf_dir), close_fds=False, shell=True):
300298
raise RuntimeError(error_message % (command, tex_dir))
301-
logger.warning("Build finished. The built documents can be found in %s", pdf_dir)
299+
logger.warning(f"Build finished. The built documents can be found in {pdf_dir}.")
302300

303301
def clean(self, *args):
304302
shutil.rmtree(self._doctrees_dir())

src/sage_docbuild/ext/inventory_builder.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
Inventory builder
43
@@ -23,10 +22,9 @@ class InventoryBuilder(DummyBuilder):
2322
A customized builder which only generates intersphinx "object.inv"
2423
inventory files. The documentation files are not written.
2524
"""
26-
2725
name = "inventory"
2826
format = "inventory"
29-
epilog = "The inventory file " + INVENTORY_FILENAME + " is in %(outdir)s."
27+
epilog = "The inventory file is in %(outdir)s."
3028

3129
def get_outdated_docs(self) -> Iterable[str]:
3230
"""

0 commit comments

Comments
 (0)