Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textual run behaviour no longer matches the docs #2391

Closed
davep opened this issue Apr 26, 2023 · 1 comment · Fixed by #2414
Closed

textual run behaviour no longer matches the docs #2391

davep opened this issue Apr 26, 2023 · 1 comment · Fixed by #2414
Labels
bug Something isn't working documentation Improvements or additions to documentation Task

Comments

@davep
Copy link
Contributor

davep commented Apr 26, 2023

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.

@davep davep added bug Something isn't working documentation Improvements or additions to documentation Task labels Apr 26, 2023
@github-actions
Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant