Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Sep 22, 2023
1 parent 88568cd commit 8ce9d64
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/uproot/writing/_cascadetree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,8 +1334,8 @@ def write_updates(self, sink):
base
+ datum["basket_metadata_start"]
- 25 # empty TObjArray of fBaskets (embedded)
- 8 # specialized TLeaf* members (fMinimum, fMaximum)
- 4 # null fLeafCount
- 8 # specialized TLeaf* members (fMinimum, fMaximum)
- 4 # null fLeafCount
- 14 # generic TLeaf members
)
sink.write(
Expand All @@ -1345,8 +1345,9 @@ def write_updates(self, sink):
datum["dtype"].itemsize,
0,
datum["kind"] == "counter",
_dtype_to_char[datum["dtype"]] != _dtype_to_char[datum["dtype"]].upper()
)
_dtype_to_char[datum["dtype"]]
!= _dtype_to_char[datum["dtype"]].upper(),
),
)

if datum["kind"] == "counter":
Expand Down Expand Up @@ -1459,8 +1460,10 @@ def write_jagged_basket(self, sink, branch_name, compression, array, offsets):
)
compressed_data = uproot.compression.compress(uncompressed_data, compression)

#get size of biggest string
self._metadata["fLen"] = max( [offsets[i+1]-offsets[i] for i in range(len(offsets)-1)] )
# get size of biggest string
self._metadata["fLen"] = max(
[offsets[i + 1] - offsets[i] for i in range(len(offsets) - 1)]
)

fLast = offsets[-1]
fObjlen = len(uncompressed_data)
Expand Down

0 comments on commit 8ce9d64

Please sign in to comment.