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

Use mypy in pre-commit #14

Closed
nicoddemus opened this issue Feb 22, 2022 · 2 comments
Closed

Use mypy in pre-commit #14

nicoddemus opened this issue Feb 22, 2022 · 2 comments

Comments

@nicoddemus
Copy link
Owner

Since we are using type annotations, I think we should enable mypy in the pre-commit configuration.

We might also consider configuring mypy to demand type annotations for all parameters and return types in pytest_rich.py, while also enabling full type checking even in non-annotated functions under tests/.

@joshuadavidthomas
Copy link
Collaborator

I have a branch for this, but will probably need a few cleanup PRs before merging it because there are quite a few type errors to work through.

A couple in the RichTerminalReporter, but embarrisingly for me, most of them are in the custom traceback class I wrote. 😳

@nicoddemus
Copy link
Owner Author

Ahh that is absolutely normal, if no tool is checking it, it is easy to introduce erros!

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