diff --git a/src/uproot/interpretation/objects.py b/src/uproot/interpretation/objects.py index 37306a135..89f2c8b1d 100644 --- a/src/uproot/interpretation/objects.py +++ b/src/uproot/interpretation/objects.py @@ -758,7 +758,7 @@ def __init__(self, model, members, original=None): member, value = members[i] if member is not None and not all_headers_prepended: all_headers_prepended = True - if member is None and all_headers_prepended or len(members) == 1: + if (member is None and all_headers_prepended) or len(members) == 1: all_headers_prepended = False del members[i] diff --git a/src/uproot/reading.py b/src/uproot/reading.py index f50154569..6ce050a34 100644 --- a/src/uproot/reading.py +++ b/src/uproot/reading.py @@ -1943,7 +1943,7 @@ def title_of(self, where, recursive=True): Note that this does not read any data from the file. """ - if recursive and "/" in where or ":" in where: + if (recursive and "/" in where) or ":" in where: step, last_item = self.descent_into_path(where) return step[last_item].title else: @@ -1965,7 +1965,7 @@ def classname_of(self, where, encoded=False, version=None, recursive=True): Note that this does not read any data from the file. """ - if recursive and "/" in where or ":" in where: + if (recursive and "/" in where) or ":" in where: step, last_item = self.descent_into_path(where) return step[last_item].classname else: @@ -1987,7 +1987,7 @@ def class_of(self, where, version=None, recursive=True): Note that this does not read any data from the file. """ - if recursive and "/" in where or ":" in where: + if (recursive and "/" in where) or ":" in where: return self._file.class_named( self.classname_of(where, version=version), version=version ) @@ -2009,7 +2009,7 @@ def streamer_of(self, where, version="max", recursive=True): Note that this does not read any data from the file. """ - if recursive and "/" in where or ":" in where: + if (recursive and "/" in where) or ":" in where: return self._file.streamer_named( self.classname_of(where, version=version), version=version ) diff --git a/src/uproot/writing/__init__.py b/src/uproot/writing/__init__.py index 8d88957f7..add713a3b 100644 --- a/src/uproot/writing/__init__.py +++ b/src/uproot/writing/__init__.py @@ -35,6 +35,13 @@ ) __all__ = [ + "WritableBranch", + "WritableDirectory", + "WritableFile", + "WritableTree", + "create", + "dask_write", + "recreate", "to_TArray", "to_TH1x", "to_TH2x", @@ -45,12 +52,5 @@ "to_TProfile2D", "to_TProfile3D", "to_writable", - "WritableDirectory", - "WritableFile", - "WritableTree", - "WritableBranch", - "create", - "recreate", "update", - "dask_write", ]