Skip to content

Commit c9e659c

Browse files
committed
Fix typing
1 parent 1e21c54 commit c9e659c

4 files changed

Lines changed: 6 additions & 16 deletions

File tree

scripts/educational_resources.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
# /// script
22
# requires-python = ">=3.14"
33
# dependencies = [
4-
# "biomappings",
5-
# "bioregistry",
6-
# "curies-processing",
7-
# "pyobo[gilda-slim]",
8-
# "sssom-curator",
9-
# "sssom-pydantic",
4+
# "biomappings[predict-lexical]",
105
# ]
116
#
127
# [tool.uv.sources]
138
# biomappings = { path = "../", editable = true }
14-
# sssom-curator = { path = "../../sssom-curator", editable = true }
15-
# sssom-pydantic = { path = "../../sssom-pydantic", editable = true }
16-
# pyobo = { path = "../../pyobo", editable = true }
17-
# bioregistry = { path = "../../bioregistry", editable = true }
18-
# curies-processing = { path = "../../curies-processing" }
199
# ///
2010

2111
"""Generate mappings between educational resources."""

scripts/generate_cl_mesh_mappings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
matches = gilda.ground(data["name"])
3737
if not matches:
3838
if data["name"].endswith(" cells"):
39-
matches = gilda.ground(data["name"].replace(" cells", ""))
39+
matches = gilda.ground(data["name"].replace(" cells", "")) # type:ignore[no-untyped-call]
4040
elif data["name"].endswith(" cell"):
41-
matches = gilda.ground(data["name"].replace(" cell", ""))
41+
matches = gilda.ground(data["name"].replace(" cell", "")) # type:ignore[no-untyped-call]
4242
if not matches:
4343
continue
4444

4545
mesh_ids = set()
4646
for match in matches:
47-
groundings = match.get_groundings()
47+
groundings = match.get_groundings() # type:ignore[no-untyped-call]
4848
mesh_ids |= {id for ns, id in groundings if ns == "MESH"}
4949
if len(mesh_ids) > 1:
5050
print(f"Multiple MESH IDs for {node}")

scripts/generate_vaccine_mappings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def main() -> None:
2323
for term in iter_terms():
2424
texts = [term.name, *(s.name for s in term.synonyms)]
2525
for text in texts:
26-
for scored_match in grounder.get_matches(text + " vaccine"):
26+
for scored_match in grounder.get_matches(text + " vaccine"): # type:ignore[no-untyped-call]
2727
pred = SemanticMapping(
2828
subject=term.reference,
2929
predicate=exact_match,

scripts/generate_wikipathways_orthologs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
def _lexical_exact_match(name1: str, name2: str) -> bool:
19-
return cast(str, normalize(name1)) == cast(str, normalize(name2))
19+
return cast(str, normalize(name1)) == cast(str, normalize(name2)) # type:ignore[no-untyped-call]
2020

2121

2222
def iterate_orthologous_lexical_matches(prefix: str = "wikipathways") -> Iterable[SemanticMapping]:

0 commit comments

Comments
 (0)