-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathmain.py
36 lines (28 loc) · 874 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
Module to provide for a simple bootstrap for the project.
"""
import contextlib
class Main:
"""
Class to provide for a simple bootstrap for the project.
"""
def main(self):
"""
Main entrance point.
"""
with contextlib.suppress(KeyboardInterrupt):
import cProfile
import os
from pymarkdown.main import PyMarkdownLint
performance_run_indicator = (
os.getenv("PYMARKDOWNLINT__PERFRUN", "0").strip().lower()
)
if performance_run_indicator in ("1", "true"):
cProfile.run(
"from pymarkdown.main import PyMarkdownLint; PyMarkdownLint().main()",
"p0.prof",
)
else:
PyMarkdownLint().main()
if __name__ == "__main__":
Main().main()