On #162 , went down a rabbit hole trying to add a mypy plugin, similar to the coverage one.
This ended up being fairly maddening, as there are a lot of crystalized opinions about .endswith((".py", ".pyi")). Working around these ended up hitting roadblocks in a number of different directions, and as most users will be using a mypyc-compiled version of mypy, they can't be worked around simply.
Some levers:
Some pitfalls:
- non-
.py(i) files need some special settings to not be interpreted as __main__
- it's fairly easy to end up with duplicate source files as the
MypyFile.module (also the dictionary key handed to the plugin) seems to be pretty finicky
On #162 , went down a rabbit hole trying to add a
mypyplugin, similar to thecoverageone.This ended up being fairly maddening, as there are a lot of crystalized opinions about
.endswith((".py", ".pyi")). Working around these ended up hitting roadblocks in a number of different directions, and as most users will be using amypyc-compiled version ofmypy, they can't be worked around simply.Some levers:
PYTHON_EXTENSIONSglobal is overrideableoptionsbeing handed down, and can overloadtransform_sourceSome pitfalls:
.py(i)files need some special settings to not be interpreted as__main__MypyFile.module(also the dictionary key handed to the plugin) seems to be pretty finicky