| 1 | """Entry-point module, in case you use `python -m griffe`. |
| 2 | |
| 3 | Why does this file exist, and why `__main__`? For more info, read: |
| 4 | |
| 5 | - https://www.python.org/dev/peps/pep-0338/ |
| 6 | - https://docs.python.org/3/using/cmdline.html#cmdoption-m |
| 7 | """ |
| 8 | |
| 9 | import sys |
| 10 | |
| 11 | try: |
| 12 | from griffecli import main |
| 13 | except ModuleNotFoundError as exc: |
| 14 | raise ModuleNotFoundError( |
| 15 | "`griffecli` or its dependencies are not installed. Install `griffecli` to use `python -m griffe`.", |
| 16 | ) from exc |
| 17 | |
| 18 | if __name__ == "__main__": |
| 19 | sys.exit(main(sys.argv[1:])) |