dropbox / dropbox/sqlalchemy-stubs

Consider using pytest-mypy-plugins

Open
#105 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
583
Forks
96
PR merge metrics
No merged PRs in 30d

Description

Hi! Thanks for this awesome project!

I am [TypedDjango](https://github.com/TypedDjango) team member, we maintain types for, well, django. And we do pretty much the same job.

For example, we also test our types the similar way as you do in [`tests/`](https://github.com/dropbox/sqlalchemy-stubs/tree/master/test). We even created a tool called [`pytest-mypy-plugins`](https://github.com/typeddjango/pytest-mypy-plugins) ([announcing post](https://sobolevn.me/2019/08/testing-mypy-types)) to help us with this task. Maybe it will be also helpful to you as well.

That's how the simplest test looks like:

```yaml
- case: compose_two_wrong_functions
main: |
from returns.functions import compose

def first(num: int) -> float:
return float(num)

def second(num: float) -> str:
return str(num)

reveal_type(compose(first, second)(1)) # N: builtins.str*
```

In case you like - I can send a PR with the refactored tests. Or we can collaborate on this together.

Ask any questions you have!

P.S. This project was listed in [awesome-python-stubs](https://github.com/typeddjango/awesome-python-stubs) list.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.