@@ -72,7 +72,7 @@ class RenderTaxonomies(Task):
72
72
name = "render_taxonomies"
73
73
74
74
def _generate_classification_data (self , taxonomy , lang ):
75
- """Create context and kw for a classification overview page ."""
75
+ """Prepare lookup tables for cross- classification navigation links ."""
76
76
# Collect all relevant classifications
77
77
if taxonomy .has_hierarchy :
78
78
# Create clipped tree
@@ -354,6 +354,7 @@ def get_subnode_data(subnode):
354
354
return task
355
355
356
356
def _add_cross_classification_navigation_links (self , taxonomy , classification , context , kw , lang , generate_list , generate_rss ):
357
+ """Add various cross-classification navigation links to kw and context."""
357
358
classifications , classifications_lookup , clipped_root_list , clipped_flat_hierarchy , clipped_flat_lookup , clipped_node_lookup = self .classification_data [taxonomy .classification_name ][lang ]
358
359
# Get previous and next in (flattened) list of all classifications
359
360
i = classifications_lookup .get (classification )
@@ -414,6 +415,7 @@ def _add_cross_classification_navigation_links(self, taxonomy, classification, c
414
415
result = {}
415
416
416
417
def add (name , classification ):
418
+ """Helper for adding variables."""
417
419
result [name ] = classification
418
420
if classification is not None :
419
421
result ['{0}_name' .format (name )] = taxonomy .get_classification_friendly_name (classification , lang , only_last_component = False )
0 commit comments