Skip to content

Commit

Permalink
Prefer format string
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Duberstein committed Apr 13, 2021
1 parent ffbde34 commit a8e50f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 1 addition & 4 deletions bindings/pydeck/pydeck/io/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,7 @@ def iframe_with_srcdoc(html_str, width="100%", height=500):
def render_for_colab(html_str, iframe_height):
from IPython.display import HTML, Javascript # noqa

js_height_snippet = "google.colab.output.setIframeHeight(%d, true, {minHeight: %d})" % (
iframe_height,
iframe_height,
)
js_height_snippet = f"google.colab.output.setIframeHeight({iframe_height}, true, {{minHeight: {iframe_height}}})"
display(Javascript(js_height_snippet)) # noqa
display(HTML(html_str)) # noqa

Expand Down
13 changes: 11 additions & 2 deletions bindings/pydeck/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,20 @@ def run(self):
if build_all:
log.info("Installing build dependencies with yarn. This may take a while...")
check_call(
["yarn", "bootstrap"], cwd=yarn_root, stdout=sys.stdout, stderr=sys.stderr, env=env,
["yarn", "bootstrap"],
cwd=yarn_root,
stdout=sys.stdout,
stderr=sys.stderr,
env=env,
)
else:
log.info("Installing build dependencies with `npm run build`.")
check_call(
["npm", "run", "build"], cwd=widget_dir, stdout=sys.stdout, stderr=sys.stderr, env=env,
["npm", "run", "build"],
cwd=widget_dir,
stdout=sys.stdout,
stderr=sys.stderr,
env=env,
)

self.clean_frontend_build()
Expand Down Expand Up @@ -185,6 +193,7 @@ def run(self):
author_email="ajduberstein@gmail.com",
url="https://github.com/visgl/deck.gl/tree/master/bindings/pydeck",
keywords=["data", "visualization", "graphics", "GIS", "maps"],
python_requires=">=3.7",
classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
Expand Down

0 comments on commit a8e50f5

Please sign in to comment.