Commit 533e4f29 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[utils] Fix security issue detected by bandit

parent 47b7af46
......@@ -25,6 +25,9 @@
# #
###############################################################################
"""
Helper methods and utilities
"""
import os
import sys
......@@ -36,8 +39,10 @@ import logging
logger = logging.getLogger(__name__)
ENV = jinja2.Environment(loader=jinja2.PackageLoader(__name__, "templates"))
"""Jinja2 environment for loading our templates"""
# Jinja2 environment for loading our templates
ENV = jinja2.Environment(
loader=jinja2.PackageLoader(__name__, "templates"), autoescape=True
)
def generate_database(views=None):
......@@ -129,13 +134,14 @@ TEMPLATE_FUNCTION = dict(
plotters=generate_plotter,
)
"""Functions for template instantiation within beat.editor"""
class PythonFileAlreadyExistsError(Exception):
pass
# Functions for template instantiation within beat.editor
def generate_python_template(entity, name, confirm, config, **kwargs):
"""Generates a template for a BEAT entity with the given named arguments
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment