From 0e031e5794320e8d85093f8101f4ea88e89580cb Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 6 Mar 2026 08:05:15 -0500 Subject: [PATCH] embeds render differently. tighten this up. --- bot/resources/tags/if-name-main.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bot/resources/tags/if-name-main.md b/bot/resources/tags/if-name-main.md index eb43c31f3b..19543c384f 100644 --- a/bot/resources/tags/if-name-main.md +++ b/bot/resources/tags/if-name-main.md @@ -5,7 +5,6 @@ embed: --- This is a convention for code that should run if the file is the main file of your program: - ```py def main(): ... @@ -13,9 +12,6 @@ def main(): if __name__ == "__main__": main() ``` +If the file is run directly, then the `main()` function will be run. If the file is imported, it will not run. -If the file is run directly, then the `main()` function will be run. -If the file is imported, it will not run. - -For more about why you would do this and how it works, see -[`if __name__ == "__main__"`](https://pythondiscord.com/pages/guides/pydis-guides/if-name-main/). +For more about why you would do this and how it works, see [`if __name__ == "__main__"`](https://pythondiscord.com/pages/guides/pydis-guides/if-name-main/).