Skip to content

Commit

Permalink
💄 update coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Jun 5, 2020
1 parent 70c064c commit d701fce
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ python_version= '3.6'

[packages]
pybars3 = "*"
lml = '>=0.0.7'
lml = '>=0.1.0'

[dev-packages]
nose = "*"
Expand Down
5 changes: 2 additions & 3 deletions moban_handlebars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
import moban.constants as constants
from lml.plugin import PluginInfo, PluginInfoChain

from moban_handlebars.helpers import HandlebarHelper
from moban_handlebars._version import __author__, __version__

from moban_handlebars.partials import register_partial

PluginInfoChain(__name__).add_a_plugin_instance(
PluginInfo(
Expand All @@ -12,5 +13,3 @@
tags=["handlebars", "hbs"],
)
)
from moban_handlebars.helpers import HandlebarHelper
from moban_handlebars.partials import register_partial
4 changes: 2 additions & 2 deletions moban_handlebars/constants.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
HELPER_EXTENSION = 'Handlebar-Helpers'
PARTIALS_EXTENSION = 'Handlebar-Partials'
HELPER_EXTENSION = "Handlebar-Helpers"
PARTIALS_EXTENSION = "Handlebar-Partials"
7 changes: 5 additions & 2 deletions moban_handlebars/engine.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from typing import Dict
from lml.plugin import PluginManager

from pybars import Compiler
from lml.plugin import PluginManager
from moban.externals import file_system

from moban_handlebars.constants import HELPER_EXTENSION, PARTIALS_EXTENSION


Expand Down Expand Up @@ -61,6 +62,8 @@ def apply_template(self, template, data: Dict, _):

partials = PARTIALS.get_all()
partials = dict(list(partials))
rendered_content = "".join(template(data, helpers=helpers, partials=partials))
rendered_content = "".join(
template(data, helpers=helpers, partials=partials)
)
rendered_content = rendered_content
return rendered_content
1 change: 1 addition & 0 deletions moban_handlebars/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from lml.plugin import PluginInfo

from moban_handlebars.constants import HELPER_EXTENSION


Expand Down
3 changes: 2 additions & 1 deletion moban_handlebars/partials.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pybars import Compiler
from lml.plugin import PluginInfo

from moban_handlebars.constants import PARTIALS_EXTENSION
from pybars import Compiler


def register_partial(identifier, partial):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pybars3
lml>=0.0.7
lml>=0.1.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

INSTALL_REQUIRES = [
"pybars3",
"lml>=0.0.7",
"lml>=0.1.0",
]
SETUP_COMMANDS = {}

Expand Down

0 comments on commit d701fce

Please sign in to comment.