-
Notifications
You must be signed in to change notification settings - Fork 1
/
minify.py
18 lines (17 loc) · 944 Bytes
/
minify.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import python_minifier
with open("./astronode.py") as f:
contents = python_minifier.minify(f.read(),
remove_annotations=True,
remove_pass=False,
remove_literal_statements=True,
combine_imports=True,
hoist_literals=True,
rename_locals=True,
preserve_locals=None,
rename_globals=False,
preserve_globals=None,
remove_object_base=False,
convert_posargs_to_args=False,
preserve_shebang=True)
with open("./astronode.min.py","w") as fp:
fp.writelines(contents)