Skip to content

Remnant issues from #3304; adding more type annotations #3373

Open
@tabedzki

Description

@tabedzki

Remnant check boxes from #3304:

  • the return value of find_redundant_units in remove_redundant.py. It currently returns a list of a two member list.
    • Should we update that to be a list of 2 member tuples? Is there a reason why it is current a list of lists?
  • In sortingview_curation.py, there is # TODO @alessio you remove this after testing. I have not annotated this function since it would require importing BaseSorting since even in quotes, Pylance does not recognize it.

After ensuring most documented functions offer return values, I think there are instances where defining input type hints can be useful as the input type definitions are sometimes implicitly used in the return type annotation. For example, if we annotate CurationSorting to have "BaseSorting" as part of the input in def __init__(self, sorting: "BaseSorting", make_graph=False, properties_policy="keep"):, then the return values of .sorting() and .current_sorting() are automatically provided instead of Any. The importance of this may not be high as these are internal functions rather than external functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions