Skip to content

Fully type annotate any partially typed functions (mypy) #5884

@f-schnabel

Description

@f-schnabel

Is your feature request related to a problem? Please describe.
As a followup of #5823 and #5657 a next step could be to fill out type annotations for any function that already has at least one type annotation.

Describe the solution you'd like
Fully type annotate parameters and return types for functions that have at least one type annotation.
This can also be enforced by the mypy config disallow_incomplete_defs = True.
Should not be done in one big PR, but in smaller PRs (maybe for each module or less).

Describe alternatives you've considered
Maybe first get https://mypy.readthedocs.io/en/stable/config_file.html#confval-disallow_untyped_defs to pass, so for each function you would only need at least one type annotation.

Additional context

Finished Modules:

  • _extensions
  • apps
  • auto3dseg
  • bundle
  • config
  • data
  • engines
  • fl
  • handlers
  • inferers
  • losses
  • metrics
  • networks
  • optimizers
  • transforms
  • utils
  • visualize

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions