bihealth / sodar-core

SODAR Core: A Django-based framework for building scientific data management web apps
MIT License
9 stars 1 forks source link

Implement type annotations #1461

Closed holtgrewe closed 1 month ago

holtgrewe commented 1 month ago

Problem

Python type annotations are very useful as they enable many static checks and eliminate whole classes of bugs. Plus, you get really nice type-safe editor autocompletion. There are type annotations available for Django. sodar-core based sites cannot fully benefit from this as django-sodar-core package is missing type annotations.

Solution

Implement type annotations and add static type checking as a CI check.

Alternative Solutions

Additional Context

I would recommend pyright over mypy as the type checking engine.

holtgrewe commented 1 month ago

CC @tedil who is an expert in Python type annotations

mikkonie commented 1 month ago

Dupe of #568, closing.