From d2edf150cf2c876971383a4a484f289ce7e7f680 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 6 Jan 2025 16:22:23 -0500 Subject: Remove Python main idiom and add coding conventions to README.md I realized I don't need this stupid `__main__` convention anymore because my build system always calls Python programs like `python -m main`, so I just need to have a function named `main()`. I also started adding some general coding conventions to the README and fixed a typo. --- Biz/Dragons/main.py | 4 ---- Biz/Que/Client.py | 4 ---- Biz/Storybook.py | 4 ---- 3 files changed, 12 deletions(-) (limited to 'Biz') diff --git a/Biz/Dragons/main.py b/Biz/Dragons/main.py index de84ff5..0cb4554 100755 --- a/Biz/Dragons/main.py +++ b/Biz/Dragons/main.py @@ -251,7 +251,3 @@ def main() -> None: repo.print_blackholes(full=args.blackholes) repo.print_liabilities(full=args.liabilities) repo.print_stale(full=args.stale) - - -if __name__ == "__main__": - main() diff --git a/Biz/Que/Client.py b/Biz/Que/Client.py index 7b28e27..671b464 100755 --- a/Biz/Que/Client.py +++ b/Biz/Que/Client.py @@ -235,7 +235,3 @@ def main() -> None: recv(argv) except KeyboardInterrupt: sys.exit(0) - - -if __name__ == "__main__": - main() diff --git a/Biz/Storybook.py b/Biz/Storybook.py index 0c96ee7..f151394 100755 --- a/Biz/Storybook.py +++ b/Biz/Storybook.py @@ -718,7 +718,3 @@ class Generate(ludic.web.Endpoint[StoryInputs]): hx_trigger="submit", ), ) - - -if __name__ == "__main__": - main() -- cgit v1.2.3