Skip to content

Commit

Permalink
Updating custom_html_writer after Sphinx update removed a class.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Jun 22, 2017
1 parent 64d2ce3 commit c7d1618
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs_build/custom_html_writer.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit c7d1618

Please sign in to comment.