1717API of a Pyke.knowlege_base, so that we can list its case-specific facts, as
1818used in :meth:`iris.fileformats.netcdf._actions_activation_stats`.
1919
20- TODO: get rid of redundact fact-database identifier arguments.
21-
2220"""
2321from .actions import run_actions
2422
@@ -98,6 +96,17 @@ def activate(self):
9896 """
9997 run_actions (self )
10098
99+ def get_kb (self ):
100+ """
101+ Get a FactEntity, which mimic (bits of) a knowledge-base.
102+
103+ Just allowing
104+ :meth:`iris.fileformats.netcdf._action_activation_stats` to list the
105+ facts.
106+
107+ """
108+ return self .facts
109+
101110 def print_stats (self ):
102111 """
103112 No-op, called by
@@ -110,32 +119,21 @@ def add_case_specific_fact(self, fact_name, fact_arglist):
110119 """
111120 Record a fact about the current output operation.
112121
113- Roughly, self.facts.entity_lists[fact_name].append(fact_arglist).
114-
115- NOTE: 'kb_name' is no longer used.
122+ Roughly,
123+ facts = self.facts.entity_lists[fact_name].case_specific_facts
124+ facts.append(fact_arglist)
116125
117126 """
118127 self .facts .add_fact (fact_name , fact_arglist )
119128
120- def get_kb (self ):
121- """
122- Get a FactEntity, which mimic (bits of) a knowledge-base.
123-
124- Just allowing
125- :meth:`iris.fileformats.netcdf._action_activation_stats` to list the
126- facts.
127-
128- """
129- return self .facts
130-
131129 def fact_list (self , fact_name ):
132130 """
133131 Return the facts (arg-lists) for one fact name.
134132
135133 A shorthand form used only by the new 'actions' routines.
136134
137135 AKA 'case-specific-facts', in the original.
138- Roughly "return self.facts.entity_lists[fact_name]".
136+ Roughly = " self.facts.entity_lists[fact_name].case_specific_facts ".
139137
140138 """
141139 return self .facts .sect_facts (fact_name )
0 commit comments