Skip to content

Commit 6982f42

Browse files
committed
fixes fomratting
1 parent 4ef0000 commit 6982f42

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

packages/pytest-simcore/src/pytest_simcore/helpers/scrunch_citations.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,20 @@
1313

1414
def split_citations(citations: list[str]) -> list[tuple[str, str]]:
1515
def _split(citation: str) -> tuple[str, str]:
16+
assert citation.startswith("("), f"Got {citation=}"
17+
assert citation.endswith(")"), f"Got {citation=}"
18+
# make sure there is a comma before RRID: so we can split
1619
if "," not in citation:
1720
citation = citation.replace("(", "(,")
18-
name, rrid = re.match(
19-
r"^[\(]{0,1}(.*),\s*RRID:(.+)[\)]{0,1}$", citation
20-
).groups()
21+
22+
name, rrid = re.match(r"^\((.*),\s*RRID:(.+)\)$", citation).groups()
2123
return name, rrid
2224

2325
return list(map(_split, citations))
2426

2527

2628
# http://antibodyregistry.org/AB_90755
27-
ANTIBODY_CITATIONS = split_citations(["Millipore Cat# AB1542, RRID:AB_90755)"])
29+
ANTIBODY_CITATIONS = split_citations(["(Millipore Cat# AB1542, RRID:AB_90755)"])
2830

2931
# https://www.addgene.org/44362/
3032
PLAMID_CITATIONS = split_citations(["(RRID:Addgene_44362)"])

services/web/server/tests/integration/01/scicrunch/test_scicrunch__resolver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ async def test_scicrunch_resolves_all_valid_rrids(
7575
assert any(
7676
proper_citation in valid_formats
7777
for proper_citation in resolved_citations
78-
), f"No proper_citation found with both name and rrid: {resolved_citations=} not in {valid_formats=}"
78+
), f"No proper_citation found with both {name=} and {rrid=}: {resolved_citations=} not in {valid_formats=}"

0 commit comments

Comments
 (0)