From 6aaaf88189ef7246746537ee9766de3d56820c8d Mon Sep 17 00:00:00 2001 From: Jake VanderPlas Date: Wed, 13 Oct 2021 07:04:04 -0700 Subject: [PATCH] DOC: fix use of deprecated sphinx functions --- altair/sphinxext/altairgallery.py | 2 +- altair/sphinxext/schematable.py | 6 +++--- doc/conf.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/altair/sphinxext/altairgallery.py b/altair/sphinxext/altairgallery.py index 1a064c0b3..28393306b 100644 --- a/altair/sphinxext/altairgallery.py +++ b/altair/sphinxext/altairgallery.py @@ -303,7 +303,7 @@ def main(app): def setup(app): app.connect("builder-inited", main) - app.add_stylesheet("altair-gallery.css") + app.add_css_file("altair-gallery.css") app.add_config_value("altair_gallery_dir", "gallery", "env") app.add_config_value("altair_gallery_ref", "example-gallery", "env") app.add_config_value("altair_gallery_title", "Example Gallery", "env") diff --git a/altair/sphinxext/schematable.py b/altair/sphinxext/schematable.py index f7f12acc2..880e7e190 100644 --- a/altair/sphinxext/schematable.py +++ b/altair/sphinxext/schematable.py @@ -37,7 +37,7 @@ def type_description(schema): def prepare_table_header(titles, widths): - """Build docutil empty table """ + """Build docutil empty table""" ncols = len(titles) assert len(widths) == ncols @@ -60,7 +60,7 @@ def prepare_table_header(titles, widths): def add_class_def(node, classDef): - """Add reference on classDef to node """ + """Add reference on classDef to node""" ref = addnodes.pending_xref( reftarget=classDef, @@ -79,7 +79,7 @@ def add_class_def(node, classDef): def add_text(node, text): - """Add text with inline code to node """ + """Add text with inline code to node""" is_text = True for part in reCode.split(text): if part: diff --git a/doc/conf.py b/doc/conf.py index 3a39289f3..336d55d0d 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -163,8 +163,8 @@ # and # https://github.com/rtfd/sphinx_rtd_theme/issues/117 def setup(app): - app.add_stylesheet("theme_overrides.css") - app.add_stylesheet("custom.css") + app.add_css_file("theme_overrides.css") + app.add_css_file("custom.css") # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied