Skip to content

Commit 51e7c3b

Browse files
committed
format python with pre-commit
1 parent d09e393 commit 51e7c3b

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

seqspec/auth.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ def profile_summaries(self) -> List[Dict]:
5858
"kind": profile.kind,
5959
"hosts": profile.hosts,
6060
"username_env": profile.username_env,
61-
"username_present": os.environ.get(profile.username_env) is not None,
61+
"username_present": os.environ.get(profile.username_env)
62+
is not None,
6263
"password_env": profile.password_env,
63-
"password_present": os.environ.get(profile.password_env) is not None,
64+
"password_present": os.environ.get(profile.password_env)
65+
is not None,
6466
}
6567
)
6668
return summaries

seqspec/seqspec_print_html.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ def build_seqspec_view_data(spec: Assay) -> dict[str, Any]:
3131
"date": spec.date,
3232
"description": spec.description,
3333
"lib_struct": spec.lib_struct,
34-
"modalities": [build_modality_view(spec, modality) for modality in spec.modalities],
34+
"modalities": [
35+
build_modality_view(spec, modality) for modality in spec.modalities
36+
],
3537
}
3638

3739

@@ -48,9 +50,13 @@ def build_modality_view(spec: Assay, modality: str) -> dict[str, Any]:
4850
"modality": modality,
4951
"library_region_id": libspec.region_id,
5052
"total_bp": total_bp,
51-
"sequence_protocols": protocol_rows(spec.sequence_protocol, modality, "protocol_id"),
53+
"sequence_protocols": protocol_rows(
54+
spec.sequence_protocol, modality, "protocol_id"
55+
),
5256
"sequence_kits": protocol_rows(spec.sequence_kit, modality, "kit_id"),
53-
"library_protocols": protocol_rows(spec.library_protocol, modality, "protocol_id"),
57+
"library_protocols": protocol_rows(
58+
spec.library_protocol, modality, "protocol_id"
59+
),
5460
"library_kits": protocol_rows(spec.library_kit, modality, "kit_id"),
5561
"region_nodes": region_nodes,
5662
"regions": regions,
@@ -63,7 +69,9 @@ def region_views(
6369
) -> tuple[list[dict[str, Any]], list[dict[str, Any]], int]:
6470
"""Build both the full region tree and the flattened leaf regions."""
6571

66-
region_nodes, leaf_regions, total_bp = walk_regions(libspec.regions, depth=0, bp_start=0)
72+
region_nodes, leaf_regions, total_bp = walk_regions(
73+
libspec.regions, depth=0, bp_start=0
74+
)
6775
return region_nodes, leaf_regions, total_bp
6876

6977

seqspec/seqspec_upgrade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def upgrade_0_2_0_to_0_4_0(spec: Assay) -> Assay:
124124
url="",
125125
urltype="",
126126
md5=md5,
127-
)
127+
)
128128
spec.seqspec_version = "0.3.0"
129129
return upgrade_0_3_0_to_0_4_0(spec)
130130

0 commit comments

Comments
 (0)