Skip to content

Commit

Permalink
drop unused caching from Dataset._get_field_info (12/n)
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Dec 4, 2022
1 parent 10f464d commit 6610011
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions yt/data_objects/data_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1469,9 +1469,9 @@ def _determine_fields(self, fields):
explicit_fields.append(field)
continue

ftype, fname = self._tupleize_field(field)
finfo = self.ds._get_field_info((ftype, fname))

# ftype, fname = self._tupleize_field(field)
finfo = self.ds._get_field_info(field)
ftype, fname = finfo.name
# really ugly check to ensure that this field really does exist somewhere,
# in some naming convention, before returning it as a possible field type
if (
Expand Down
2 changes: 1 addition & 1 deletion yt/data_objects/static_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ def _get_field_info_helper(
# storing this condition before altering it
guessing_type = ftype == "unknown"
if guessing_type:
candidates = [(ft, fn) for ft, fn in self.field_info.keys() if fn == fname]
candidates = [(ft, fn) for ft, fn in self.field_info if fn == fname]

ft: Tuple[str, str] = (ftype, fname)
if ft in self.field_info:
Expand Down

0 comments on commit 6610011

Please sign in to comment.