Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Commit

Permalink
fix some Python 3 values()-is-not-a-list cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jpivarski committed Dec 7, 2017
1 parent 24664d9 commit fa7bfa4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions uproot/interp/jagged.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def jaggedarray_len(context, builder, sig, args):
@numba.njit([sig])
def _jaggedarray_len(jaggedarray):
return len(jaggedarray.stops)
cres = _jaggedarray_len.overloads.values()[0]
cres, = _jaggedarray_len.overloads.values()
len_imp = cres.target_context.get_function(cres.entry_point, cres.signature)._imp
del cres.target_context._defns[cres.entry_point]
jaggedarray_len.cache[sig.args] = len_imp
Expand All @@ -416,7 +416,7 @@ def jaggedarray_getitem(context, builder, sig, args):
getitem_imp = jaggedarray_getitem.cache[sig.args]
except KeyError:
getitem = numba.njit([sig])(_jaggedarray_getitem)
cres = getitem.overloads.values()[0]
cres, = getitem.overloads.values()
getitem_imp = cres.target_context.get_function(cres.entry_point, cres.signature)._imp
del cres.target_context._defns[cres.entry_point]
jaggedarray_getitem.cache[sig.args] = getitem_imp
Expand Down Expand Up @@ -470,7 +470,7 @@ def jaggedarray_getitem_foriter(context, builder, jaggedarraytype, jaggedarray,
@numba.njit([jaggedarraytype.contents(jaggedarraytype, JaggedArrayIteratorModel.integertype)])
def _jaggedarray_getitem(a, i):
return a.contents[a.starts[i]:a.stops[i]]
cres = _jaggedarray_getitem.overloads.values()[0]
cres, = _jaggedarray_getitem.overloads.values()
getitem_imp = cres.target_context.get_function(cres.entry_point, cres.signature)._imp
del cres.target_context._defns[cres.entry_point]
jaggedarray_getitem_foriter.cache = getitem_imp
Expand Down
2 changes: 1 addition & 1 deletion uproot/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ def _format(self, foldnames, indent="", strip=""):
name = name[len(strip) + 1:]

if len(name) > 26:
out = [indent + name, indent + "{0:26s} {1:26s} {2}".format("", self._streamer.__class__.__name__, interpret(self))]
out = [indent + name, indent + "{0:26s} {1:26s} {2}".format("", "(no streamer)" if self._streamer is None else self._streamer.__class__.__name__, interpret(self))]
else:
out = [indent + "{0:26s} {1:26s} {2}".format(name, "(no streamer)" if self._streamer is None else self._streamer.__class__.__name__, interpret(self))]

Expand Down
2 changes: 1 addition & 1 deletion uproot/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import re

__version__ = "2.5.4"
__version__ = "2.5.5"
version = __version__
version_info = tuple(re.split(r"[-\.]", __version__))

Expand Down

0 comments on commit fa7bfa4

Please sign in to comment.