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

[Task]: Use a static type checker e.g. mypy, in our CI #1184

Open
aponcedeleonch opened this issue Mar 3, 2025 · 0 comments
Open

[Task]: Use a static type checker e.g. mypy, in our CI #1184

aponcedeleonch opened this issue Mar 3, 2025 · 0 comments

Comments

@aponcedeleonch
Copy link
Contributor

Description

Currently, we are using type annotations in most, if not all, of our functions, classes, and variables. However, due to Python’s dynamic nature, these types act more like hints or documentation rather than something that is strictly enforced. By integrating a static type checker into our CI pipeline, we can proactively catch potential type-related bugs, such as accidentally changing the type of a variable when passing it between functions, without realizing it.

mypy is a popular static type checker for Python. It analyzes your code and alerts you when types are used incorrectly — for example, if a function expects a string but receives an integer. Adding mypy to our CI pipeline would help us ensure better type safety across the codebase, improve code clarity, and reduce the likelihood of subtle bugs making their way into production.

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants