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

Add static type-based linting #144

Open
1kastner opened this issue Aug 19, 2022 · 1 comment
Open

Add static type-based linting #144

1kastner opened this issue Aug 19, 2022 · 1 comment
Labels
technical-debt This increases the code quality without changing the functionality

Comments

@1kastner
Copy link
Owner

1kastner commented Aug 19, 2022

In the future, the command mypy --ignore-missing-imports --package conflowgen or an equivalent other static type checker should not find any errors anymore. As the code works fine in all known cases, we need to check how to deal with the failing instances. Is it better to add some assertions (especially, assert not None)? Should we maybe ignore a few lines?

@1kastner 1kastner added the technical-debt This increases the code quality without changing the functionality label Aug 19, 2022
@1kastner
Copy link
Owner Author

For the unittests, this is a bit problematic, see discussion at python/mypy#4063. We might also just exclude the unittests from the analysis? That might be better than using unittest asserts first and then use assert statements to state the very same thing! The tools we use might have some impact on our code but I do not want to make this project fit a linter if the adjustments lead to code duplications and the introduction of artifacts that just exist to satisfy mypy.

@1kastner 1kastner changed the title Add mypy check Add static type check Aug 28, 2022
@1kastner 1kastner changed the title Add static type check Add static type-based linting Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical-debt This increases the code quality without changing the functionality
Projects
None yet
Development

No branches or pull requests

1 participant