mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-23 11:01:31 +02:00
fix linter warnings
This commit is contained in:
parent
4d53ab9bb5
commit
60810a5225
@ -4,16 +4,17 @@ Export colors in various formats.
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
from jinja2 import Template
|
||||||
|
|
||||||
from . import util
|
from . import util
|
||||||
from .settings import CACHE_DIR, CONF_DIR, MODULE_DIR
|
from .settings import CACHE_DIR, CONF_DIR, MODULE_DIR
|
||||||
from jinja2 import Template
|
|
||||||
|
|
||||||
|
|
||||||
def template_jinja(colors, input_file, output_file=None):
|
def template_jinja(colors, input_file, output_file=None):
|
||||||
|
"""Read template file, process jinja2 template and
|
||||||
|
save the file elsewhere."""
|
||||||
data = util.read_file_raw(input_file)
|
data = util.read_file_raw(input_file)
|
||||||
t = Template("".join(data))
|
util.save_file(Template("".join(data)).render(**colors), output_file.replace(".jinja", ""))
|
||||||
util.save_file(t.render(**colors), output_file.replace(".jinja", ""))
|
|
||||||
|
|
||||||
|
|
||||||
def template(colors, input_file, output_file=None):
|
def template(colors, input_file, output_file=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user