Skip to content

Commit

Permalink
Update jinja_partials and bring Reports into sync (#111)
Browse files Browse the repository at this point in the history
* Update jinja_partials with improved style

* Update pylint.yml file for Github Actions
  • Loading branch information
Colelyman authored Oct 31, 2024
1 parent 82a74e8 commit a4f034b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions CRISPResso2/CRISPRessoReports/.github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Pylint

on:
push:
branches:
- '*'

pull_request:
types: [opened, reopened]

jobs:
build:
Expand Down
8 changes: 6 additions & 2 deletions CRISPResso2/CRISPRessoReports/jinja_partials.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@

from markupsafe import Markup

try:
import flask
except ImportError:
flask = None


def render_partial(template_name, renderer=None, markup=True, **data):
"""
Expand All @@ -36,8 +41,7 @@ def render_partial(template_name, renderer=None, markup=True, **data):
if renderer is None:
if flask is None:
raise PartialsException('No renderer specified')
else:
renderer = flask.render_template
renderer = flask.render_template

if markup:
return Markup(renderer(template_name, **data))
Expand Down

0 comments on commit a4f034b

Please sign in to comment.