Skip to content

Adding typing annotations to FINN #1146

Description

@bwintermann

Prerequisites

None

Details / New behavior

I would propose adding type annotations / type hints to as many classes and functions in FINN as possible. For external code such as QONNX, stubs could be used.

Motivation

Personally I found that when developing in FINN, it was immensely helpful to have type hints added. This makes the projects structure very clear and helps especially newcomers to understand how components play together much quicker. Additionally, when having long iteration cycles due to for example synthesis times, having a static type checker such as mypy can prevent some of the errors before the run has even started, potentially saving quite some time.

Parts of FINN affected

Transformations, CustomOps and util functions, but ideally everything in the FINN codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions