xarray icon indicating copy to clipboard operation
xarray copied to clipboard

Expermimental mypy plugin

Open headtr1ck opened this issue 3 years ago • 2 comments

I was playing around a bit with a mypy plugin and this was the best I could come up with. Unfortunately the mypy docu about the plugins is not very detailed...

This plugin makes mypy recognize the user defined accessors.

There is a quite severe bug in there (due to my lack of understanding of mypy internals probably) which makes it work only on the first run but when you change a line in your code and run mypy again it will crash... (you can delete the cache to make it work one more time again :)

Any chance that a mypy expert can figure this out? haha

headtr1ck avatar Oct 03 '22 17:10 headtr1ck

(FYI I had been the mypy person here — for my sins — but I think this is beyond my understanding — so putting an issue into mypy might be the best path forward on the cache issue...)

max-sixty avatar Oct 03 '22 18:10 max-sixty

(FYI I had been the mypy person here — for my sins — but I think this is beyond my understanding — so putting an issue into mypy might be the best path forward on the cache issue...)

Didn't want to steal your job, haha.

Yes, I think a mypy issue might be the best way forward. I still have to construct a minimal example for this issue though ...

headtr1ck avatar Oct 03 '22 18:10 headtr1ck