You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that as of v0.21.0 the behaviour of textual run doesn't match that in the docs. Taking our examples as a place to test, if I do the following:
$ textual run five_by_five.py
the example runs fine. However, if I remove this:
if__name__=="__main__":
FiveByFive().run()
from the end of the file then this:
$ textual run five_by_five.py
silently returns, with no warnings, errors or application shown. According to the docs:
The run sub-command will first look for a App instance called app in the global scope of your Python file. If there is no app, it will create an instance of the first App class it finds and run that.
which means that it should have seen there's no top-level variable called app and should have found FiveByFive and run that.
If this is intended new behaviour we should change the docs; if not it looks like #2338 removed some behaviour.
The text was updated successfully, but these errors were encountered:
It seems that as of v0.21.0 the behaviour of
textual run
doesn't match that in the docs. Taking our examples as a place to test, if I do the following:the example runs fine. However, if I remove this:
from the end of the file then this:
silently returns, with no warnings, errors or application shown. According to the docs:
which means that it should have seen there's no top-level variable called
app
and should have foundFiveByFive
and run that.If this is intended new behaviour we should change the docs; if not it looks like #2338 removed some behaviour.
The text was updated successfully, but these errors were encountered: