Tidy the return type of `App.render`
Currently the return type of App.render is RenderableType; in our docs and in most places we talk about App.render returning a RenderResult. RenderResult is an alias for RenderableType and is a top-level value in textual.app.
This can cause a lint/type warning in dev's apps if they let their IDE complete the signature when writing their own render method, as it will often complete to something like this:
def render(self) -> RenderableType:
return super().render()
which in turn will auto-import RenderableType from textual.app. This can then result in a warning like this:
We should change App.render so that it's typed as returning RenderResult rather than RenderableType, then such completion will use the type that is exported from textual.app.
Also note that the code in the compose/render HOWTO seems to have fallen foul of this and has that type warning.
This seems a simple enough fix that I could help (if wanted!). But I can't seem reproduce this in my editor, so I just wanted to check where you've seen/tested this?
[EDIT: I'm assuming certainly in VSCode from other instances I found. I've gone ahead with a PR but needs a double-check that this is indeed the fix!]
But I can't seem reproduce this in my editor, so I just wanted to check where you've seen/tested this?
In my case Emacs+eglot+pyright while auto-completing def render.