Browse Source

🔨 Clean up Python imports (#24736)

dmitrygribenchuk 2 years ago
parent
commit
83aac65664
No account linked to committer's email address

+ 0
- 1
buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py View File

4
 import pioutil
4
 import pioutil
5
 if pioutil.is_pio_build():
5
 if pioutil.is_pio_build():
6
 
6
 
7
-	import os
8
 	Import("env", "projenv")
7
 	Import("env", "projenv")
9
 
8
 
10
 	flash_size = 0
9
 	flash_size = 0

+ 0
- 1
buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py View File

3
 #
3
 #
4
 import pioutil
4
 import pioutil
5
 if pioutil.is_pio_build():
5
 if pioutil.is_pio_build():
6
-	import os
7
 	from os.path import join
6
 	from os.path import join
8
 	from os.path import expandvars
7
 	from os.path import expandvars
9
 	Import("env")
8
 	Import("env")

+ 0
- 1
buildroot/share/PlatformIO/scripts/mc-apply.py View File

5
 import json
5
 import json
6
 import sys
6
 import sys
7
 import shutil
7
 import shutil
8
-import re
9
 
8
 
10
 opt_output = '--opt' in sys.argv
9
 opt_output = '--opt' in sys.argv
11
 output_suffix = '.sh' if opt_output else '' if '--bare-output' in sys.argv else '.gen'
10
 output_suffix = '.sh' if opt_output else '' if '--bare-output' in sys.argv else '.gen'

+ 1
- 1
buildroot/share/PlatformIO/scripts/offset_and_rename.py View File

10
 #
10
 #
11
 import pioutil
11
 import pioutil
12
 if pioutil.is_pio_build():
12
 if pioutil.is_pio_build():
13
-    import sys,marlin
13
+    import marlin
14
 
14
 
15
     env = marlin.env
15
     env = marlin.env
16
     board = env.BoardConfig()
16
     board = env.BoardConfig()

+ 0
- 1
buildroot/share/PlatformIO/scripts/openblt.py View File

3
 #
3
 #
4
 import pioutil
4
 import pioutil
5
 if pioutil.is_pio_build():
5
 if pioutil.is_pio_build():
6
-    import os,sys
7
     from os.path import join
6
     from os.path import join
8
 
7
 
9
     Import("env")
8
     Import("env")

+ 1
- 1
buildroot/share/PlatformIO/scripts/preflight-checks.py View File

5
 import pioutil
5
 import pioutil
6
 if pioutil.is_pio_build():
6
 if pioutil.is_pio_build():
7
 
7
 
8
-    import os,re,sys
8
+    import re,sys
9
     from pathlib import Path
9
     from pathlib import Path
10
     Import("env")
10
     Import("env")
11
 
11
 

+ 1
- 1
buildroot/share/PlatformIO/scripts/preprocessor.py View File

1
 #
1
 #
2
 # preprocessor.py
2
 # preprocessor.py
3
 #
3
 #
4
-import subprocess,re
4
+import subprocess
5
 
5
 
6
 nocache = 1
6
 nocache = 1
7
 verbose = 0
7
 verbose = 0

+ 0
- 1
buildroot/share/dwin/bin/makeIco.py View File

18
 #  along with this program.  If not, see <https://www.gnu.org/licenses/>.
18
 #  along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
 #----------------------------------------------------------------
19
 #----------------------------------------------------------------
20
 
20
 
21
-import os
22
 import os.path
21
 import os.path
23
 import argparse
22
 import argparse
24
 import DWIN_ICO
23
 import DWIN_ICO

+ 0
- 1
buildroot/share/dwin/bin/splitIco.py View File

18
 #  along with this program.  If not, see <https://www.gnu.org/licenses/>.
18
 #  along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
 #----------------------------------------------------------------
19
 #----------------------------------------------------------------
20
 
20
 
21
-import os
22
 import os.path
21
 import os.path
23
 import argparse
22
 import argparse
24
 import DWIN_ICO
23
 import DWIN_ICO

+ 2
- 2
buildroot/share/scripts/gen-tft-image.py View File

22
 
22
 
23
 # Generate Marlin TFT Images from bitmaps/PNG/JPG
23
 # Generate Marlin TFT Images from bitmaps/PNG/JPG
24
 
24
 
25
-import sys,re,struct
26
-from PIL import Image,ImageDraw
25
+import sys,struct
26
+from PIL import Image
27
 
27
 
28
 def image2bin(image, output_file):
28
 def image2bin(image, output_file):
29
 	if output_file.endswith(('.c', '.cpp')):
29
 	if output_file.endswith(('.c', '.cpp')):

+ 1
- 1
buildroot/share/vscode/create_custom_upload_command_CDC.py View File

13
 from __future__ import print_function
13
 from __future__ import print_function
14
 from __future__ import division
14
 from __future__ import division
15
 
15
 
16
-import subprocess,os,sys,platform
16
+import subprocess,os,platform
17
 from SCons.Script import DefaultEnvironment
17
 from SCons.Script import DefaultEnvironment
18
 
18
 
19
 current_OS = platform.system()
19
 current_OS = platform.system()

+ 1
- 1
buildroot/share/vscode/create_custom_upload_command_DFU.py View File

9
 #  Will continue on if a COM port isn't found so that the compilation can be done.
9
 #  Will continue on if a COM port isn't found so that the compilation can be done.
10
 #
10
 #
11
 
11
 
12
-import os,sys
12
+import os
13
 from SCons.Script import DefaultEnvironment
13
 from SCons.Script import DefaultEnvironment
14
 import platform
14
 import platform
15
 current_OS = platform.system()
15
 current_OS = platform.system()

Loading…
Cancel
Save