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

The introduction to query_one is potentially misleading #4488

Closed
davep opened this issue May 7, 2024 · 2 comments
Closed

The introduction to query_one is potentially misleading #4488

davep opened this issue May 7, 2024 · 2 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@davep
Copy link
Contributor

davep commented May 7, 2024

When query_one is introduced in the docs it says:

If you call it with a selector it will return the first matching widget.

This isn't how it works. IIRC it was true for a wee while, in the run up to the release of v0.2; but it hasn't been the case for at least 18 months.

This part should probably either be scrubbed, or it should mention the error that can be raised and perhaps stress that the selector must result in a single hit.

@davep davep added bug Something isn't working documentation Improvements or additions to documentation labels May 7, 2024
@willmcgugan
Copy link
Collaborator

Thanks. Fixed in main. a9e87b5

Copy link

github-actions bot commented May 7, 2024

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
Projects
None yet
Development

No branches or pull requests

2 participants