Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve type-checker mypy configuration #298

Open
daniel-zullo-frequenz opened this issue Jul 29, 2024 · 0 comments
Open

Improve type-checker mypy configuration #298

daniel-zullo-frequenz opened this issue Jul 29, 2024 · 0 comments
Labels
part:template Affects the cookiecutter template files part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) priority:high Address this as soon as possible type:enhancement New feature or enhancement visitble to users
Milestone

Comments

@daniel-zullo-frequenz
Copy link
Contributor

What's needed?

The type checker mypy is configured to check specific packages within a repository. In practice, there are repositories that contain more than one package. This setup is not ideal because typically only one package is configured to be type-checked by mypy. As a result, parts of the codebase may not be checked, leading to potential type-related issues going unnoticed.

To ensure type-checking, all relevant packages should be included in the mypy configuration. This would help in maintaining type consistency and catching errors across the entire codebase.

Proposed solution

Replace the setting of packages and use files and mypy_path instead as follows:

Current configuration:

packages = ["your_package_name"]  # Use the actual package name here

to be replaced by:

files = ["src", "tests"]
mypy_path = "src" 

This will ensure the codebase is fully type-checked (at least for any file within src and tests) without the need for the user to set explicitly the packages.

Use cases

No response

Alternatives and workarounds

No response

Additional context

No response

@daniel-zullo-frequenz daniel-zullo-frequenz added part:❓ We need to figure out which part is affected priority:❓ We need to figure out how soon this should be addressed type:enhancement New feature or enhancement visitble to users priority:high Address this as soon as possible and removed priority:❓ We need to figure out how soon this should be addressed labels Jul 29, 2024
@llucax llucax added this to the v0.11.0 milestone Jul 29, 2024
@llucax llucax added part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) part:template Affects the cookiecutter template files and removed part:❓ We need to figure out which part is affected labels Jul 29, 2024
@llucax llucax modified the milestones: v0.11.0, v0.12.0 Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:template Affects the cookiecutter template files part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) priority:high Address this as soon as possible type:enhancement New feature or enhancement visitble to users
Projects
None yet
Development

No branches or pull requests

2 participants