finn icon indicating copy to clipboard operation
finn copied to clipboard

Adding typing annotations to FINN

Open bwintermann opened this issue 1 year ago • 0 comments

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.

bwintermann avatar Aug 01 '24 08:08 bwintermann