Coverage for packages / griffelib / src / griffe / __main__.py: 0.00%

7 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-02-11 11:48 +0100

1"""Entry-point module, in case you use `python -m griffe`. 

2 

3Why 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 

9import sys 

10 

11try: 

12 from griffecli import main 

13except 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 

18if __name__ == "__main__": 

19 sys.exit(main(sys.argv[1:]))