Skip to content

Commit bff260f

Browse files
committed
chore: fix formatter warnings
1 parent 8576a2d commit bff260f

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

alephclient/api.py

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ def __init__(
8787
session_id: Optional[str] = None,
8888
retries: int = settings.MAX_TRIES,
8989
):
90-
9190
if not host:
9291
raise AlephException("No host environment variable found")
9392
self.base_url = urljoin(host, "/api/2/")

alephclient/cli.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def read_json_stream(stream):
255255
@click.pass_context
256256
def delete_entity(ctx, entity_id):
257257
"""Delete a single entity from standard input"""
258-
api = ctx.obj['api']
258+
api = ctx.obj["api"]
259259
entity_id = entity_id.strip()
260260
try:
261261
api.delete_entity(entity_id)
@@ -283,7 +283,10 @@ def delete_entity(ctx, entity_id):
283283
"--unsafe", is_flag=True, default=False, help="allow references to archive hashes"
284284
)
285285
@click.option(
286-
"--cleaned", is_flag=True, default=False, help="disable server-side validation for all types"
286+
"--cleaned",
287+
is_flag=True,
288+
default=False,
289+
help="disable server-side validation for all types",
287290
)
288291
@click.pass_context
289292
def write_entities(
@@ -294,7 +297,7 @@ def write_entities(
294297
chunksize=1000,
295298
force=False,
296299
unsafe=False,
297-
cleaned=False
300+
cleaned=False,
298301
):
299302
"""Read entities from standard input and index them."""
300303
api = ctx.obj["api"]
@@ -310,7 +313,10 @@ def read_json_stream(stream):
310313
count += 1
311314
if count % chunksize == 0:
312315
if sys.stdout.isatty():
313-
print(f"\r\x1b[K[{foreign_id}] Bulk load entities: {count:_}...", end='')
316+
print(
317+
f"\r\x1b[K[{foreign_id}] Bulk load entities: {count:_}...",
318+
end="",
319+
)
314320
else:
315321
log.info(f"[{foreign_id}] Bulk load entities: {count:_}...")
316322
yield json.loads(line)

alephclient/fetchdir.py

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def fetch_object(api: AlephAPI, path: Path, entity: Dict, overwrite: bool = Fals
3636
object_path = path.joinpath(file_name)
3737
url = entity.get("links", {}).get("file")
3838
if url is not None:
39-
4039
# Skip existing files after checking file size:
4140
if not overwrite and object_path.exists():
4241
for file_size in entity.get("properties", {}).get("fileSize", []):

alephclient/tests/test_api_collection.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def test_502(self, mocker, http_error_response):
2323
collection_id = "8"
2424

2525
mocker.patch.object(
26-
self.api.session, "request",
26+
self.api.session,
27+
"request",
2728
return_value=http_error_response,
2829
)
2930

0 commit comments

Comments
 (0)