Skip to content

Add type hints to entities and service layers #374

@joepal1976

Description

@joepal1976

Although python is a dynamically typed language, type hints have been an integrated part for some time now (see for example the PEP https://peps.python.org/pep-0484/).

While not mandatory for functionality, type hints makes life easier in code editors and it opens up for running automatic checker such as mypy.

So far MPFB is mostly without type hints, although there are infrequent and spotty coverage here and there.

The service layer (src/mpfb/services) should obviously have a thorough coverage of type hints. The entities layer (src/mpfb/entities) would also benefit, although the nodemodel (src/mpfb/entities/nodemodel) should probably be out of scope.

Covering the ui layer with type hints seems like more effort than it would be worth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code quality / refactoringIssue that doesn't change functionality or fixes a bug, but relates to quality and maintainability

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions