From 2069305f434867f5937670f2bd261b2da0e5b9c3 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Thu, 22 Jun 2017 12:45:39 -0700 Subject: [PATCH] Updating custom_html_writer after Sphinx update removed a class. --- docs_build/custom_html_writer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs_build/custom_html_writer.py b/docs_build/custom_html_writer.py index 34ec567c..d8a9bbdb 100644 --- a/docs_build/custom_html_writer.py +++ b/docs_build/custom_html_writer.py @@ -1,3 +1,5 @@ +# Copyright 2017 Google Inc. +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -12,7 +14,7 @@ """Custom HTML builder. -This is used to verify that snippets do not get stale. +This is used to verify that all snippets are ``doctest``-ed. See http://www.sphinx-doc.org/en/stable/extdev/tutorial.html to learn how to write a custom Sphinx extension. @@ -33,7 +35,7 @@ """ -class CustomHTMLWriter(html.SmartyPantsHTMLTranslator): +class CustomHTMLWriter(html.HTMLTranslator): """Custom HTML writer. This makes sure that code blocks are all tested. It does this by @@ -54,7 +56,7 @@ def visit_literal_block(self, node): node.rawsource, language, test_type) raise errors.ExtensionError(msg) # The base classes are not new-style, so we can't use super(). - return html.SmartyPantsHTMLTranslator.visit_literal_block(self, node) + return html.HTMLTranslator.visit_literal_block(self, node) def setup(app):