Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating custom_html_writer after Sphinx update removed a class. #10

Merged
merged 1 commit into from
Jun 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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