Skip to content

Commit 22b935f

Browse files
committed
Fix comments; cosmetic changes.
1 parent 0a12fc7 commit 22b935f

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

lib/iris/fileformats/_nc_load_rules/engine.py

+15-17
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
API of a Pyke.knowlege_base, so that we can list its case-specific facts, as
1818
used in :meth:`iris.fileformats.netcdf._actions_activation_stats`.
1919
20-
TODO: get rid of redundact fact-database identifier arguments.
21-
2220
"""
2321
from .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

Comments
 (0)