This is an archive of the discontinued Mercurial Phabricator instance.

windows: suppress pytype warnings for Windows imports and functions
ClosedPublic

Authored by mharbison72 on Nov 23 2019, 12:15 AM.

Details

Summary

This should allow the modules to not be excluded, and not generate complaints on
non Windows platforms.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.Nov 23 2019, 12:15 AM

I'm not sure if there are plans to vendor *.pyi files. Maybe that could be used to backfill platform specific modules instead of doing this. But for now is seems better to get the error count and blacklist length reduced.

dlax accepted this revision.Nov 23 2019, 3:39 AM

I'm not sure if there are plans to vendor *.pyi files. Maybe that could be used to backfill platform specific modules instead of doing this. But for now is seems better to get the error count and blacklist length reduced.

I think .pyi files are a bit annoying. And since Python 2 support isn't long for this world, I think we should hold out and just switch to inline type annotations as soon as we drop Python 2 support. This assumes we make good on our plan to drop Python 2 after the first release in 2020 at latest. If not, we should consider vendoring .pyi files so we can have nicer things sooner.

indygreg accepted this revision.Nov 23 2019, 7:58 PM
This revision is now accepted and ready to land.Nov 23 2019, 7:58 PM