Skip to content

Commit

Permalink
ci: Please Pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger committed Mar 22, 2024
1 parent d47117c commit e5f769a
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions capella_model_explorer/backend/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ def __post_init__(self):
self.grouped_templates, self.templates = index_templates(
self.templates_path
)
self.app.state.templates = templates = Jinja2Templates(
directory=PATH_TO_FRONTEND
)
self.app.state.templates = Jinja2Templates(directory=PATH_TO_FRONTEND)

self.configure_routes()

Expand Down Expand Up @@ -136,17 +134,18 @@ def render_template(template_name: str, object_id: str):
@self.app.get("/api/model-info")
def model_info():
info = self.model.info
return dict(
title=info.title,
revision=info.revision,
hash=info.rev_hash,
capella_version=info.capella_version,
branch=info.branch,
badge=self.model.description_badge,
)
return {
"title": info.title,
"revision": info.revision,
"hash": info.rev_hash,
"capella_version": info.capella_version,
"branch": info.branch,
"badge": self.model.description_badge,
}

@self.app.get("/{rest_of_path:path}")
async def catch_all(request: Request, rest_of_path: str):
del rest_of_path
return self.app.state.templates.TemplateResponse(
"index.html", {"request": request}
)
Expand Down

0 comments on commit e5f769a

Please sign in to comment.