-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathremove-py2-support.sh
19 lines (17 loc) · 1.32 KB
/
remove-py2-support.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
find ./ -type f -iname "*.py" -exec sed -i '/from __future__ import print_function/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from __future__ import division/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from __future__ import unicode_literals/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from __future__ import absolute_import/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from io import open/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from builtins import object/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from builtins import map/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from builtins import chr/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from builtins import dict/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from builtins import super/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from builtins import zip/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from builtins import range/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from builtins import str/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from builtins import int/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/from future import standard_library/d' {} \;
find ./ -type f -iname "*.py" -exec sed -i '/standard_library.install_aliases()/d' {} \;