Skip to content

Commit

Permalink
flake8 (so good we ignore 79 chars)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Feb 16, 2015
1 parent 05dd14c commit 33af789
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
6 changes: 2 additions & 4 deletions nikola/plugins/command/import_wordpress.py
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
3 changes: 1 addition & 2 deletions nikola/plugins/task/bundles.py
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions nikola/plugins/task/scale_images.py
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions nikola/plugins/template/jinja.py
Expand Up @@ -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
Expand Down

0 comments on commit 33af789

Please sign in to comment.