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 trio to projects list #111

Merged
merged 3 commits into from
Nov 29, 2023
Merged

Conversation

A5rocks
Copy link
Contributor

@A5rocks A5rocks commented Nov 29, 2023

Trio's an alternative async library that I help maintain!

Here's a couple reasons why this might help mypy primer output:

@A5rocks
Copy link
Contributor Author

A5rocks commented Nov 29, 2023

[snip] I think I misinterpreted default mode of mypy primer. Ignore!

@erictraut
Copy link
Collaborator

Would it make sense to add this library for pyright as well? Pyright is referenced in the pyproject.toml, so I'm guessing that pyright has been used on this code base.

@A5rocks
Copy link
Contributor Author

A5rocks commented Nov 29, 2023

We don't run pyright over the codebase (the perils of type checker compatibility) but we do have "type tests" we run both mypy and pyright over -- would that be a valuable addition?

@erictraut
Copy link
Collaborator

I think it would be a valuable addition regardless. Mypy_primer emits deltas, and it's useful to know about any changes to type checking outputs based on changes I make to pyright.

Copy link
Owner

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mypy_primer -k trio --old 1.6.1 indicates that most of the diff is changes introduced between 1.6.1 and mypy head. src/trio/_tests/test_exports.py:158: error: Unused "type: ignore" comment [unused-ignore] is the only one that is due to an env difference.

It's good to add pyright for trio even if pyright doesn't currently run cleanly on trio

@A5rocks
Copy link
Contributor Author

A5rocks commented Nov 29, 2023

I unfortunately don't seem to be able to run mypy_primer w/ pyright locally so I can't check if that works. (Windows has a cryptic error and WSL says npm fails...)

EDIT: fixed (I'll probably PR the fix soon enough) and:

(.venv) PS C:\Users\A5rocks\Documents\mypy_primer> mypy_primer -k trio --type-checker pyright

trio
https://github.com/python-trio/trio
----------

old
> C:\Users\A5rocks\AppData\Local\Temp\mypy_primer\projects\_trio_venv\scripts\activate.bat; C:\Users\A5rocks\AppData\Local\Temp\mypy_primer\old_pyright\pyright\packages\pyright\index.js src/trio/_tests/type_tests (0.1s)
----------

new
> C:\Users\A5rocks\AppData\Local\Temp\mypy_primer\projects\_trio_venv\scripts\activate.bat; C:\Users\A5rocks\AppData\Local\Temp\mypy_primer\new_pyright\pyright\packages\pyright\index.js src/trio/_tests/type_tests (0.1s)
==========

... Hopefully that's fine; I assume pyright would be complaining about our assert_type usage if not!

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
@hauntsaninja hauntsaninja merged commit 439dbc8 into hauntsaninja:master Nov 29, 2023
1 check passed
@hauntsaninja
Copy link
Owner

Thanks again!

@A5rocks A5rocks deleted the add-trio branch November 29, 2023 23:07
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.

None yet

3 participants