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

Integrate mypy #263

Closed
sobolevn opened this issue Oct 23, 2017 · 11 comments
Closed

Integrate mypy #263

sobolevn opened this issue Oct 23, 2017 · 11 comments
Labels
enhancement Enhancement proposals

Comments

@sobolevn
Copy link
Collaborator

When #258 will be ready the next step is to integrate mypy.

There is a standalone script.
And there's a plugin for pytest, but I have not used it yet. https://pypi.python.org/pypi/pytest-mypy

@lk-geimfari
Copy link
Owner

@sammyshj Excellent. It will be awesome!

@lk-geimfari lk-geimfari added the enhancement Enhancement proposals label Oct 23, 2017
@lk-geimfari
Copy link
Owner

lk-geimfari commented Nov 5, 2017

@sobolevn Unfortunately, the solution with pytest-mypy works slowly... too slowly: 3m 42s 840ms

@lk-geimfari
Copy link
Owner

Also it's doesn't support mypy.ini file. It's a problem.

@lk-geimfari
Copy link
Owner

I think that i'll rewrite plugin especially for us.

@sobolevn
Copy link
Collaborator Author

sobolevn commented Nov 5, 2017

@lk-geimfari this plugin is not production ready, that's true. But maybe you should help with its development instead of rewriting it?

@lk-geimfari
Copy link
Owner

@sobolevn Of course, I'll write to the author and if he agrees, I'll work on current plugin. Rewriting is an extreme measure.

@lk-geimfari
Copy link
Owner

lk-geimfari commented Nov 28, 2017

@sobolevn How should we check types? Should we check types with usual tests or after ones?

Let me illustrate ideas:

py.test --verbose --color=yes --mypy mimesis ./

or

make test # 
make type-check #

The problem with co-testing is that mypy takes a considerable amount of time.

@sobolevn
Copy link
Collaborator Author

What's the timings for tests and type checking?

@lk-geimfari
Copy link
Owner

lk-geimfari commented Nov 28, 2017

@sobolevn I have run py.test 7 minutes ago and testing still going.

UPD: Testing took 12 minutes.

@sobolevn
Copy link
Collaborator Author

mypy must be way faster. So, it is easier to run fast tests first, then slow tests.
I will also open a new issue to optimize tests speed.

@lk-geimfari
Copy link
Owner

Fixed in #299

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

No branches or pull requests

2 participants