Skip to content

Commit f525757

Browse files
committed
black the code
1 parent 69adbed commit f525757

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

moban/core/moban_factory.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,13 @@ def render_to_files(self, array_of_template_targets):
227227
self.buffered_writer.close()
228228

229229
def _render_with_finding_template_first(self, template_file_index):
230-
for (template_file, data_output_pairs) in template_file_index.items():
230+
for template_file, data_output_pairs in template_file_index.items():
231231
try:
232232
template = self.engine.get_template(template_file)
233233
template_abs_path = self.template_fs.geturl(
234234
template_file, purpose="fs"
235235
)
236-
for (data_file, output) in data_output_pairs:
236+
for data_file, output in data_output_pairs:
237237
data = self.context.get_data(data_file)
238238
flag = self.apply_template(
239239
template_abs_path, template, data, output
@@ -246,7 +246,7 @@ def _render_with_finding_template_first(self, template_file_index):
246246
self.file_count += 1
247247
except exceptions.PassOn as e:
248248
LOG.info(e)
249-
for (data_file, output) in data_output_pairs:
249+
for data_file, output in data_output_pairs:
250250
self.fall_out_targets.append(
251251
TemplateTarget(
252252
template_file,
@@ -262,9 +262,9 @@ def _render_with_finding_template_first(self, template_file_index):
262262
continue
263263

264264
def _render_with_finding_data_first(self, data_file_index):
265-
for (data_file, template_output_pairs) in data_file_index.items():
265+
for data_file, template_output_pairs in data_file_index.items():
266266
data = self.context.get_data(data_file)
267-
for (template_file, output) in template_output_pairs:
267+
for template_file, output in template_output_pairs:
268268
try:
269269
template = self.engine.get_template(template_file)
270270

moban/core/mobanfile/__init__.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ def handle_moban_file_v1(moban_file_configurations, command_line_options):
5757
# call expand template directory always after handle require please
5858
# the penalty is: newly clone repos are not visible
5959
# one more note: verify_the_existence_of_directories will remove non-exist dirs
60-
merged_options[
61-
constants.LABEL_TMPL_DIRS
62-
] = verify_the_existence_of_directories(
63-
list(
64-
expand_template_directories(
65-
merged_options[constants.LABEL_TMPL_DIRS]
60+
merged_options[constants.LABEL_TMPL_DIRS] = (
61+
verify_the_existence_of_directories(
62+
list(
63+
expand_template_directories(
64+
merged_options[constants.LABEL_TMPL_DIRS]
65+
)
6666
)
6767
)
6868
)

moban/deprecated/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def is_repo(require):
136136
@deprecated(constants.MESSAGE_DEPRECATE_COPY_SINCE_0_4_0)
137137
def handle_copy(merged_options, copy_config):
138138
copy_targets = []
139-
for (dest, src) in _iterate_list_of_dicts(copy_config):
139+
for dest, src in _iterate_list_of_dicts(copy_config):
140140
copy_targets.append(
141141
{
142142
constants.LABEL_TEMPLATE: src,

moban/main.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
"""
2-
moban
3-
~~~~~~~~~~~~~~~~~~~
2+
moban
3+
~~~~~~~~~~~~~~~~~~~
44
5-
Bring jinja2 to command line
5+
Bring jinja2 to command line
66
7-
:copyright: (c) 2016-2020 by Onni Software Ltd.
8-
:license: MIT License, see LICENSE for more details
7+
:copyright: (c) 2016-2020 by Onni Software Ltd.
8+
:license: MIT License, see LICENSE for more details
99
1010
"""
11+
1112
import re
1213
import sys
1314
import logging

0 commit comments

Comments
 (0)