Skip to content
Browse files

Make Codacy complain even less.

  • Loading branch information
felixfontein committed May 25, 2017
1 parent 845ef15 commit 270d1fb155a08a75f03c170918cee4a553136320
Showing with 2 additions and 0 deletions.
  1. +2 −0 nikola/
@@ -139,6 +139,7 @@ def flatten_tree_structure(root_list):
elements = []

def generate(input_list, indent_levels_so_far):
"""Generate flat list of nodes."""
for index, element in enumerate(input_list):
# add to destination
@@ -205,6 +206,7 @@ def parse_escaped_hierarchical_category_name(category_name):
def join_hierarchical_category_path(category_path):
"""Join a category path."""
def escape(s):
"""Espace one part of category path."""
return s.replace('\\', '\\\\').replace('/', '\\/')

return '/'.join([escape(p) for p in category_path])

0 comments on commit 270d1fb

Please sign in to comment.
You can’t perform that action at this time.