Skip to content

Commit

Permalink
add overloaded type hints to fix mkdocs warning
Browse files Browse the repository at this point in the history
  • Loading branch information
CunliangGeng committed Jun 18, 2024
1 parent 57aeacf commit f8593b5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/nplinker/nplinker.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,20 @@ def get_links(
self, objects: Sequence[MolecularFamily], scoring_method: str, **scoring_params: Any
) -> LinkGraph: ...

def get_links(self, objects, scoring_method, **scoring_params):
def get_links(
self,
objects: Sequence[BGC] | Sequence[GCF] | Sequence[Spectrum] | Sequence[MolecularFamily],
scoring_method: str,
**scoring_params: Any,
) -> LinkGraph:
"""Get the links for the given objects using the specified scoring method and parameters.
Args:
objects: A sequence of objects to get the links for. The objects must be of the same
type, i.e. `BGC`, `GCF`, `Spectrum` or `MolecularFamily` type.
For scoring method `metcalf`, the BGC objects are not supported.
scoring_method: The scoring method to use. Must be one of the valid scoring methods
`self.scoring_methods`.
`self.scoring_methods`, such as "metcalf".
scoring_params: Parameters to pass to the scoring method. If not provided, the default
parameters for the scoring method will be used.
Expand Down

0 comments on commit f8593b5

Please sign in to comment.