Skip to content

Commit 51670ee

Browse files
committed
Remove tqdm output from documentation and vertical space between lines in code blocks
1 parent 2197fe5 commit 51670ee

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/_static/custom.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* Reduce vertical space between lines in code blocks */
2+
.highlight pre, pre {
3+
line-height: 1.1; /* default ~1.4-1.5 */
4+
margin: 0;
5+
padding: 0.5em 1em; /* optional padding */
6+
}

docs/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@
1212
#
1313
import os
1414
import sys
15+
import tqdm
1516

1617
from nlmod import __version__
1718

1819
sys.path.insert(0, os.path.abspath("."))
1920

21+
# Override tqdm to disable all progress bars in documentation
22+
tqdm.tqdm = lambda *args, **kwargs: iter(args[0] if args else [])
23+
2024

2125
# -- Project information -----------------------------------------------------
2226

@@ -85,6 +89,9 @@
8589
# relative to this directory. They are copied after the builtin static files,
8690
# so a file named "default.css" will overwrite the builtin "default.css".
8791
html_static_path = ["_static"]
92+
html_css_files = [
93+
'custom.css',
94+
]
8895

8996
# add a logo
9097
html_logo = "_static/logo_10000_2_2.png"

0 commit comments

Comments
 (0)