Incorrect autofilling


Found some incorrect autofilling in Altair library. I’m not sure that it’s connected with Datalore, maybe with the library. In plot sentence alt.Chart().mark_<…>.encode() Datalore suggests to fill by encoding instead of encode.

1 Like

Hello, Nikita!

Currently we use two sources for completion: code insight powered by PyCharm, which uses static analysis, and kernel, which has runtime information.

Method mark_bar (and many other methods in altair library) is implemented via mixin pattern. Sadly, PyCharm’s code insight doesn’t work with mixins well yet, but you can upvote the issue. We’ll also contact PyCharm developers to know if there is any progress on it.

But there is also kernel completion! And in case of Jupyter kernel it works fine providing the necessary variant:

Thus, it seems like an issue with Datalore kernel, which we’ll definitely look up into. As a workaround, if proper completion for altair is crucial for you — try to switch your notebook to IPython kernel.

Thank you for your report!