This is an archive of the discontinued LLVM Phabricator instance.

Install missing mypy stubs
ClosedPublic

Authored by thopre on Jun 22 2021, 5:57 AM.

Details

Summary

Mypy currently warns about missing stubs to analyse LNT's code:
lnt/server/ui/globals.py:5: error: Library stubs not installed for
"flask" (or incompatible with Python 2.7)
lnt/server/ui/decorators.py:1: error: Library stubs not installed for
"flask" (or incompatible with Python 2.7)
lnt/lnttool/convert.py:2: error: Library stubs not installed for "click"
(or incompatible with Python 2.7)
lnt/lnttool/common.py:2: error: Library stubs not installed for "click"
(or incompatible with Python 2.7)
lnt/lnttool/import_report.py:1: error: Library stubs not installed for
"click" (or incompatible with Python 2.7)
lnt/lnttool/admin.py:4: error: Library stubs not installed for "click"
(or incompatible with Python 2.7)

This commits adds the necessary dependency to get rid of those warnings.

Diff Detail

Repository
rLNT LNT

Event Timeline

thopre created this revision.Jun 22 2021, 5:57 AM
thopre requested review of this revision.Jun 22 2021, 5:57 AM
This revision is now accepted and ready to land.Jun 22 2021, 6:22 AM
This revision was automatically updated to reflect the committed changes.

In recent versions of mypy, they have a --install-types flag which can do this automatically.

http://mypy-lang.blogspot.com/2021/06/mypy-0900-released.html

In recent versions of mypy, they have a --install-types flag which can do this automatically.

http://mypy-lang.blogspot.com/2021/06/mypy-0900-released.html

That's what I used for getting this list but it was asking me to confirm installation and I did not know of a way to disable it. I'm happy to revert this diff if there's a way to force installation.

From what I can see mypy version 0.910 (From yesterday) has new option --non-interactive:

See http://mypy-lang.blogspot.com/2021/06/mypy-0910-released.html
"This release adds the new option --non-interactive that can be used with --install-types to install suggested stub packages without asking for confirmation. "

I guess adding info about above to README would be a nice to have.

From what I can see mypy version 0.910 (From yesterday) has new option --non-interactive:

See http://mypy-lang.blogspot.com/2021/06/mypy-0910-released.html
"This release adds the new option --non-interactive that can be used with --install-types to install suggested stub packages without asking for confirmation. "

I guess adding info about above to README would be a nice to have.

Great, then I'll prepare a patch to use that instead. Thanks!