In Leo's code base, there are many method calls like this: c.config = leoConfig.LocalConfigManager(c, previousSettings)
However, mypy doesn't know that c (known to be a leo.core.leoCommands.Commands) has an attribute *config* (which we actually know is a leo.core.leoConfig.LocalConfigManager). mypy issues an error for the line: error: "Commands" has no attribute "config" [attr-defined] I've just started learning to annotate code - I started with the Freewin plugin - and I haven't worked out how to solve this problem And I noticed that it's not handled in LeoPyRef, either - mypy just emits error messages for all similar cases I looked at. I'm sure there are many other similar cases besides c.config. Is there a way to make mypy understand, or do we just have to live with it? I don't think I want to get into trying to annotate LeoPyRef, if possible. -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/97e959e8-b8e3-4577-8bcd-9d005e61e33dn%40googlegroups.com.
