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

Disable type checking for imported libraries #1227

Open
Lonerider2010 opened this issue Jun 25, 2022 · 2 comments
Open

Disable type checking for imported libraries #1227

Lonerider2010 opened this issue Jun 25, 2022 · 2 comments

Comments

@Lonerider2010
Copy link

Hello @cjolowicz, thanks for this excellent framework. That's what I was looking for. More than 30 test help to move my Python project to a higher quality level. Now I managed to get all these tests to state "successful".
Then I imported an external library (Inquirer) and boom: most of the tests failed because of missing type hints!
Is there a way to tell nox (with mypy and typeguard) not to type check this external library?

@paw-lu
Copy link
Contributor

paw-lu commented Jul 2, 2022

I'm assuming you're getting an error that mypy cannot find type definitions for a Python package? You can disable these errors by ignoring missing imports.

Example here where I've ignored missing imports a few third-party libraries.

@staticdev
Copy link
Contributor

staticdev commented Aug 1, 2022

@Lonerider2010 I have a couple of projects using this templates that also use/used inquirer (now I am mostly using prompt-toolkit which has type annotations). I am also maintainer of Inquirer BTW, but type-annotations are not really in the roadmap I would say.

You can check examples:
staticdev/irpf-investidor@9474952
https://github.com/staticdev/git-portfolio

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

3 participants