Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 152c608

Browse files
committedMay 10, 2015
Making flake8 happy.
1 parent b6e0971 commit 152c608

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

Diff for: ‎nikola/nikola.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1411,8 +1411,9 @@ def _add_post_to_category(self, post, category_name):
14111411
self.posts_per_category[self.category_path_to_category_name(current_path)].append(post)
14121412

14131413
def _sort_category_hierarchy(self):
1414-
self.category_hierarchy_lookup = {}
14151414
# First create a hierarchy of TreeNodes
1415+
self.category_hierarchy_lookup = {}
1416+
14161417
def create_hierarchy(cat_hierarchy, parent=None):
14171418
result = []
14181419
for name, children in cat_hierarchy.items():
@@ -1424,6 +1425,7 @@ def create_hierarchy(cat_hierarchy, parent=None):
14241425
if node.category_name not in self.config.get('HIDDEN_CATEGORIES'):
14251426
result.append(node)
14261427
return natsort.natsorted(result, key=lambda e: e.name, alg=natsort.ns.F | natsort.ns.IC)
1428+
14271429
root_list = create_hierarchy(self.category_hierarchy)
14281430
# Next, flatten the hierarchy
14291431
self.category_hierarchy = utils.flatten_tree_structure(root_list)

0 commit comments

Comments
 (0)
Please sign in to comment.