publication icon indicating copy to clipboard operation
publication copied to clipboard

make a mypy plugin for doing this checking at type-check time rather than runtime

Open glyph opened this issue 5 years ago • 0 comments

For projects that use mypy, we could make publication into a mypy plugin that would detect the use of private names and complain about importing them with a specific error, turning publish() into a complete no-op at runtime. This would make its runtime behavior even less esoteric and provide warnings at the time when developers are most likely to notice them.

We probably still need a runtime version since it's going to be a really long tail until all python projects both publish and consume stubs, though.

glyph avatar May 21 '20 21:05 glyph