Skip to content

Commit 911d210

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7c11ebf commit 911d210

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

disk_objectstore/container.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,7 @@ def _get_config_file(self) -> Path:
189189
"""Return the path to the container config file."""
190190
return self._folder / "config.json"
191191

192-
def _create_init_session(
193-
self
194-
) -> Session:
192+
def _create_init_session(self) -> Session:
195193
"""Return a new session to connect to the pack-index SQLite DB.
196194
197195
:param create: if True, creates the sqlite file and schema.
@@ -1143,7 +1141,7 @@ def get_total_size(self) -> TotalSize:
11431141

11441142
retval["total_size_packindexes_on_disk"] = (
11451143
self._get_pack_index_path().stat().st_size
1146-
)
1144+
)
11471145

11481146
total_size_loose = 0
11491147
for loose_hashkey in self._list_loose():
@@ -1920,7 +1918,9 @@ def add_objects_to_pack( # pylint: disable=too-many-arguments
19201918
"""
19211919
# TODO should be custom error but not sure what
19221920
if not self.is_initialised:
1923-
raise ValueError("Invalid use of function, please first initialise the container.")
1921+
raise ValueError(
1922+
"Invalid use of function, please first initialise the container."
1923+
)
19241924
stream_list: list[StreamSeekBytesType] = [
19251925
io.BytesIO(content) for content in content_list
19261926
]

disk_objectstore/database.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ class Obj(Base): # pylint: disable=too-few-public-methods
3131
) # integer ID of the pack in which this entry is stored
3232

3333

34-
def get_session(
35-
path: Path, create: bool = False
36-
) -> Optional[Session]:
34+
def get_session(path: Path, create: bool = False) -> Optional[Session]:
3735
"""Return a new session to connect to the pack-index SQLite DB.
3836
3937
:param create: if True, creates the sqlite file and schema.

tests/test_container.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,9 @@ def test_sizes(
10661066
temp_container, generate_random_data, compress_packs, compression_algorithm
10671067
):
10681068
"""Check that the information on size is reliable."""
1069-
temp_container.init_container( clear=True, compression_algorithm=compression_algorithm)
1069+
temp_container.init_container(
1070+
clear=True, compression_algorithm=compression_algorithm
1071+
)
10701072
size_info = temp_container.get_total_size()
10711073
assert size_info["total_size_packed"] == 0
10721074
assert size_info["total_size_packed_on_disk"] == 0

0 commit comments

Comments
 (0)