Run flake8 on more files (#85333)

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Dave T <17680170+davet2001@users.noreply.github.com>
This commit is contained in:
Max R
2023-01-16 14:53:14 -05:00
committed by GitHub
parent 3aad153913
commit 156c815499
6 changed files with 19 additions and 15 deletions

View File

@@ -1,6 +1,5 @@
"""
Sphinx extension to add ReadTheDocs-style "Edit on GitHub" links to the
sidebar.
Sphinx extension for ReadTheDocs-style "Edit on GitHub" links on the sidebar.
Loosely based on https://github.com/astropy/astropy/pull/347
"""
@@ -12,6 +11,7 @@ __licence__ = "BSD (3 clause)"
def get_github_url(app, view, path):
"""Build the GitHub URL."""
return (
f"https://github.com/{app.config.edit_on_github_project}/"
f"{view}/{app.config.edit_on_github_branch}/"
@@ -20,6 +20,7 @@ def get_github_url(app, view, path):
def html_page_context(app, pagename, templatename, context, doctree):
"""Build the HTML page."""
if templatename != "page.html":
return
@@ -38,6 +39,7 @@ def html_page_context(app, pagename, templatename, context, doctree):
def setup(app):
"""Set up the app."""
app.add_config_value("edit_on_github_project", "", True)
app.add_config_value("edit_on_github_branch", "master", True)
app.add_config_value("edit_on_github_src_path", "", True) # 'eg' "docs/"