summaryrefslogtreecommitdiff
path: root/Omni
diff options
context:
space:
mode:
Diffstat (limited to 'Omni')
-rwxr-xr-xOmni/Bild/Example.py4
-rwxr-xr-xOmni/Ide/MakeTags.py4
-rwxr-xr-xOmni/Llamacpp.py4
-rw-r--r--Omni/Log.py5
-rwxr-xr-xOmni/Repl.py4
5 files changed, 3 insertions, 18 deletions
diff --git a/Omni/Bild/Example.py b/Omni/Bild/Example.py
index 462a497..58e941a 100755
--- a/Omni/Bild/Example.py
+++ b/Omni/Bild/Example.py
@@ -40,7 +40,3 @@ def main() -> None:
if "test" in sys.argv:
sys.stdout.write("testing success")
sys.stdout.write(cryptic_hello("world"))
-
-
-if __name__ == "__main__":
- main()
diff --git a/Omni/Ide/MakeTags.py b/Omni/Ide/MakeTags.py
index add07c0..7f09a4e 100755
--- a/Omni/Ide/MakeTags.py
+++ b/Omni/Ide/MakeTags.py
@@ -99,7 +99,3 @@ def ctags(args: list[str], cwd: pathlib.Path = pathlib.Path()) -> None:
]
subprocess.check_call(["ctags", *excludes, *args])
subprocess.check_call(["ctags", "-e", *excludes, *args])
-
-
-if __name__ == "__main__":
- main()
diff --git a/Omni/Llamacpp.py b/Omni/Llamacpp.py
index b8975f2..eac08fd 100755
--- a/Omni/Llamacpp.py
+++ b/Omni/Llamacpp.py
@@ -38,7 +38,3 @@ def main() -> None:
test()
else:
sys.exit(0)
-
-
-if __name__ == "__main__":
- main()
diff --git a/Omni/Log.py b/Omni/Log.py
index e644a1a..8d61139 100644
--- a/Omni/Log.py
+++ b/Omni/Log.py
@@ -14,7 +14,7 @@ class LowerFormatter(logging.Formatter):
def setup(level: int = logging.INFO) -> logging.Logger:
- """Run this in your __main__ function."""
+ """Run this in your `main()` function."""
logging.basicConfig(
level=level,
format="%(levelname)s: %(name)s: %(message)s",
@@ -30,6 +30,7 @@ def setup(level: int = logging.INFO) -> logging.Logger:
return logger
-if __name__ == "__main__":
+def main() -> None:
+ """Entrypoint to test that this kinda works."""
setup()
logging.debug("i am doing testing")
diff --git a/Omni/Repl.py b/Omni/Repl.py
index 8d191e2..cad04b5 100755
--- a/Omni/Repl.py
+++ b/Omni/Repl.py
@@ -260,7 +260,3 @@ def main() -> None:
test()
else:
move()
-
-
-if __name__ == "__main__":
- main()