Add Python runnable for `__name__ in ("__main__",)` pattern (#58911)

The gutter run button for Python's main guard only appears for `if
__name__ == "__main__":` but not for the alternative membership test
pattern `if __name__ in ("__main__", "__builtin__", "builtins"):`.

This adds a second Tree-sitter query in `runnables.scm` that matches the
`in` variant. It emits the same `python-module-main-method` tag, so both
patterns get the same gutter icon and task behavior.

Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior (No dedicated tests for the
Python runnables queries exist. The build passes cleanly)
- [x] Performance impact has been considered and is acceptable

Closes #58909

Release Notes:

- Fixed Python run button not appearing in the gutter for `if __name__
in ("__main__", ...)` style main guards.

Co-authored-by: Finn Evers <finn@zed.dev>
6a37cc1173Torbjørn Lium committed on 8/19/2026, 10:16:44 PM· committed by GitHubparent30aea6a
1 file changedLine totals unavailable