diff --git a/README.md b/README.md index 2e52a10..738a0c4 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,6 @@ Since this library is used by Home Assistant, see out.txt +python -m opower -vv 2> out.txt # Build package python -m pip install build diff --git a/pyproject.toml b/pyproject.toml index e8274de..e904a11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,8 +73,8 @@ ignore = [ fixture-parentheses = false [tool.ruff.per-file-ignores] -# Allow for demo script to write to stdout -"demo.py" = ["T201"] +# Allow for main script to write to stdout +"__main__.py" = ["T201"] [tool.ruff.mccabe] max-complexity = 25 diff --git a/src/demo.py b/src/opower/__main__.py similarity index 96% rename from src/demo.py rename to src/opower/__main__.py index 71967d5..6b11f58 100644 --- a/src/demo.py +++ b/src/opower/__main__.py @@ -210,4 +210,5 @@ async def _main() -> None: print() -asyncio.run(_main()) +if __name__ == "__main__": + asyncio.run(_main())