antidote icon indicating copy to clipboard operation
antidote copied to clipboard

mypy, cache, and interface/lazy decorators

Open pauleveritt opened this issue 3 years ago • 1 comments

Almost certainly a mypy issue.

Let's say I have this:

from antidote import interface

@interface
class Greeting(Protocol):

I run mypy, it's happy. I change a docstring or comment, run again. It's unhappy:

error: Module not callable  [operator]
    @interface()

Same for @lazy. But if I do rm -rf .mypy_cache/* and run mypy again, it's happy. Until I change anything in the file.

I upgraded to latest mypy (as well as [email protected]) but no luck.

pauleveritt avatar Aug 25 '22 23:08 pauleveritt

It's indeed a mypy issue, I had the same. But it won't happen again, I've changed all modules' names to be different from the functions/objects one. It also led to issues in Sphinx.

Finistere avatar Aug 26 '22 19:08 Finistere

I'm closing the issue, this shouldn't happen anymore with the release 2.0.0. Let me know if not!

Finistere avatar Sep 01 '22 06:09 Finistere