blob: 1610a3f2f697242925e250273a1286e060b972c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import sys
from os.path import abspath, dirname
from _utils import find_sphinx_sources
from blacken_docs import main
if __name__ == "__main__":
directory = dirname(abspath(__file__))
params = sys.argv[1:] if len(sys.argv) > 1 else []
source_files = find_sphinx_sources(directory)
print(f"Running blacken-docs on {len(source_files)} source files...")
args = ["--rst-literal-blocks", *params, *source_files]
sys.exit(main(args))
|