Skip to content
Permalink
Browse files
flake8 (so good we ignore 79 chars)
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Feb 16, 2015
1 parent 05dd14c commit 33af78967e834fcfdf9c41741d2edc1c2c14b338
@@ -271,8 +271,7 @@ def import_attachment(self, item, wordpress_namespace):
link = get_text_tag(item, '{{{0}}}link'.format(wordpress_namespace),
'foo')
path = urlparse(url).path
dst_path = os.path.join(*([self.output_folder, 'files']
+ list(path.split('/'))))
dst_path = os.path.join(*([self.output_folder, 'files'] + list(path.split('/'))))
dst_dir = os.path.dirname(dst_path)
utils.makedirs(dst_dir)
LOGGER.info("Downloading {0} => {1}".format(url, dst_path))
@@ -327,8 +326,7 @@ def download_additional_image_sizes(self, item, wordpress_namespace, source_path
url = '/'.join([source_path, filename.decode('utf-8')])

path = urlparse(url).path
dst_path = os.path.join(*([self.output_folder, 'files']
+ list(path.split('/'))))
dst_path = os.path.join(*([self.output_folder, 'files'] + list(path.split('/'))))
dst_dir = os.path.dirname(dst_path)
utils.makedirs(dst_dir)
LOGGER.info("Downloading {0} => {1}".format(url, dst_path))
@@ -97,8 +97,7 @@ def build_bundle(output, inputs):
files.append(os.path.join(dname, fname))
file_dep = [os.path.join(kw['output_folder'], fname)
for fname in files if
utils.get_asset_path(fname, self.site.THEMES, self.site.config['FILES_FOLDERS'])
or fname == 'assets/css/code.css']
utils.get_asset_path(fname, self.site.THEMES, self.site.config['FILES_FOLDERS']) or fname == 'assets/css/code.css']
# code.css will be generated by us if it does not exist in
# FILES_FOLDERS or theme assets. It is guaranteed that the
# generation will happen before this task.
@@ -54,8 +54,7 @@ def process_tree(self, src, dst):
for src_name in files:
if src_name in ('.DS_Store', 'Thumbs.db'):
continue
if (not src_name.lower().endswith(tuple(self.image_ext_list))
and not src_name.upper().endswith(tuple(self.image_ext_list))):
if (not src_name.lower().endswith(tuple(self.image_ext_list)) and not src_name.upper().endswith(tuple(self.image_ext_list))):
continue
dst_file = os.path.join(dst_dir, src_name)
src_file = os.path.join(root, src_name)
@@ -114,8 +114,7 @@ def template_deps(self, template_name):
ast = self.lookup.parse(source)
dep_names = meta.find_referenced_templates(ast)
for dep_name in dep_names:
if (dep_name not in visited_templates
and dep_name is not None):
if (dep_name not in visited_templates and dep_name is not None):
visited_templates.add(dep_name)
queue.append(dep_name)
self.dependency_cache[template_name] = deps

0 comments on commit 33af789

Please sign in to comment.