Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 4, 2024
1 parent 667c88b commit 571e10a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions jupytercad_freecad/handlers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import json
import base64
import tempfile
from pathlib import Path

from jupyter_server.base.handlers import APIHandler
Expand All @@ -9,6 +8,7 @@

from jupytercad_freecad.freecad.loader import FCStd


class BackendCheckHandler(APIHandler):
@tornado.web.authenticated
def post(self):
Expand All @@ -26,6 +26,7 @@ def post(self):
else:
self.finish(json.dumps({"installed": False}))


class JCadExportHandler(APIHandler):
@tornado.web.authenticated
def post(self):
Expand Down Expand Up @@ -81,6 +82,14 @@ def setup_handlers(web_app):

base_url = web_app.settings["base_url"]

handlers = [(url_path_join(base_url, "jupytercad_freecad", "backend-check"), BackendCheckHandler),
(url_path_join(base_url, "jupytercad_freecad", "export-jcad"), JCadExportHandler)]
handlers = [
(
url_path_join(base_url, "jupytercad_freecad", "backend-check"),
BackendCheckHandler,
),
(
url_path_join(base_url, "jupytercad_freecad", "export-jcad"),
JCadExportHandler,
),
]
web_app.add_handlers(host_pattern, handlers)

0 comments on commit 571e10a

Please sign in to comment.