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

Improves mypy config. Adds explicit re-exports to __init__.py. #418

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

Daverball
Copy link
Contributor

mypy --strict will complain if Chameleon does not have explicit re-exports, so as a good citizen of the typing ecosystem we should add them, other people should not have to ignore re-export errors on our behalf. Since the module structure of Chameleon is fairly simple, this shouldn't add any real maintenance burden, since the top-level __init__.py file is the only one that re-exports imported symbols. We can also get rid of the flake8 per-file-ignores for __init__.py this way.

While I was at it I also increased the strictness of the strict config to match mypy --strict, as well as enabled most of the optional warnings. I also added some missing annotations while dealing with the new warn-return-any errors. Once everything is annotated and using the strict config, we can simplify most of the config back down to just strict = true.

`mypy --strict` will complain if Chameleon does not have those
@coveralls
Copy link

coveralls commented Mar 15, 2024

Pull Request Test Coverage Report for Build 8553843913

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 50 of 50 (100.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 92.727%

Totals Coverage Status
Change from base Build 7753260695: 0.01%
Covered Lines: 3893
Relevant Lines: 4135

💛 - Coveralls

src/chameleon/compiler.py Outdated Show resolved Hide resolved
@malthe malthe merged commit b757a4d into malthe:master Apr 4, 2024
13 checks passed
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

Successfully merging this pull request may close these issues.

3 participants