Skip to content

Commit

Permalink
Merge pull request #9 from executablebooks/black
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf authored Jul 3, 2020
2 parents 5509dc7 + ac944dd commit ad694a6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
4 changes: 1 addition & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@
"path_to_docs": "docs",
"use_repository_button": True,
"use_issues_button": True,
"launch_buttons": {
"thebelab": True
}
"launch_buttons": {"thebelab": True},
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
12 changes: 5 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@
url="https://github.com/executablebooks/sphinx-thebelab",
license="MIT License",
packages=find_packages(),
package_data={
"sphinx_thebelab": [
"_static/thebelab.css",
"_static/thebelab.js",
]
},
package_data={"sphinx_thebelab": ["_static/thebelab.css", "_static/thebelab.js",]},
classifiers=["License :: OSI Approved :: MIT License"],
install_requires=["sphinx>=1.8"],
extras_require={"sphinx": ["myst-parser[sphinx]"], "testing": ["pytest", "pytest-regressions", "beautifulsoup4"]},
extras_require={
"sphinx": ["myst-parser[sphinx]", "sphinx-book-theme"],
"testing": ["pytest", "pytest-regressions", "beautifulsoup4"],
},
)
5 changes: 3 additions & 2 deletions sphinx_thebelab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from pathlib import Path

__version__ = "0.0.6dev0"
__version__ = "0.0.5dev0"

logger = logging.getLogger(__name__)

Expand All @@ -22,12 +22,13 @@ def init_thebe_default_config(app, env, docnames):
defaults = {
"selector": ".thebe",
"selector_input": "pre",
"selector_output": ".output"
"selector_output": ".output",
}
for key, val in defaults.items():
if key not in thebe_config:
thebe_config[key] = val


def init_thebelab_core(app, env):
config_thebe = app.config["thebe_config"]
if not config_thebe:
Expand Down
4 changes: 3 additions & 1 deletion tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ def test_sphinx_thebelab(file_regression, sphinx_build):
file_regression.check(config.prettify(), basename="config_index", extension=".html")

# Testing the configure page which has a custom kernel
soup_conf = BeautifulSoup(Path(sphinx_build.path_pg_config).read_text(), "html.parser")
soup_conf = BeautifulSoup(
Path(sphinx_build.path_pg_config).read_text(), "html.parser"
)
config = soup_conf("script", {"type": "text/x-thebe-config"})
assert len(config) == 1
config = config[0]
Expand Down

0 comments on commit ad694a6

Please sign in to comment.