retype icon indicating copy to clipboard operation
retype copied to clipboard

Incompatible existing annotations when referencing classes in other modules

Open ikelos opened this issue 5 years ago • 0 comments

Hiya,

I came across your tool when trying out monkeytype and found it's very useful but bombs out on most of my files with errors like:

Annotation problem in function 'blah': 36:1: incompatible existing annotation for...

The incompatible annotations appear to be the difference between B and a.B. I tend to import modules and then reference classes within the modules rather than importing the classes directly (in order to avoid namespace pollution). Should retype support this situation but doesn't yet, or is there something else going on? Happy to debug further, just wanted to figure out if this was expected behaviour or not... 5:)

Is there a flag to unilaterally write the stub's type information into the code, ignoring the existing annotations?

ikelos avatar Dec 16 '18 23:12 ikelos