We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Exit status is always 0 when started as a Python module
When started as `python -m codespell_lib` codespell always exits with 0.

Is it intentional?


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `codespell_lib/__main__.py`
Content:
```
1 from ._codespell import _script_main
2 
3 if __name__ == "__main__":
4     _script_main()
5
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/codespell_lib/__main__.py b/codespell_lib/__main__.py
--- a/codespell_lib/__main__.py
+++ b/codespell_lib/__main__.py
@@ -1,4 +1,6 @@
+import sys
+
 from ._codespell import _script_main
 
 if __name__ == "__main__":
-    _script_main()
+    sys.exit(_script_main())

{"golden_diff": "diff --git a/codespell_lib/__main__.py b/codespell_lib/__main__.py\n--- a/codespell_lib/__main__.py\n+++ b/codespell_lib/__main__.py\n@@ -1,4 +1,6 @@\n+import sys\n+\n from ._codespell import _script_main\n \n if __name__ == \"__main__\":\n-    _script_main()\n+    sys.exit(_script_main())\n", "issue": "Exit status is always 0 when started as a Python module\nWhen started as `python -m codespell_lib` codespell always exits with 0.\r\n\r\nIs it intentional?\r\n\n", "before_files": [{"content": "from ._codespell import _script_main\n\nif __name__ == \"__main__\":\n    _script_main()\n", "path": "codespell_lib/__main__.py"}], "after_files": [{"content": "import sys\n\nfrom ._codespell import _script_main\n\nif __name__ == \"__main__\":\n    sys.exit(_script_main())\n", "path": "codespell_lib/__main__.py"}]}