diff --git a/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py b/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
index 8fa931117abb32478cd1b1588d28ffc64729d5e1..ece47ed096018fa7e27696683632acedb0304443 100644
--- a/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
+++ b/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
@@ -17,8 +17,6 @@ for i, flag in enumerate(env["LINKFLAGS"]):
 
 # Rename ${PROGNAME}.bin and save it as 'project.bin' (No encryption on the Longer3D)
 def encrypt(source, target, env):
-    import os
-
     firmware = open(target[0].path, "rb")
     marlin_alfa = open(target[0].dir.path +'/project.bin', "wb")
     length = os.path.getsize(target[0].path)
diff --git a/buildroot/share/PlatformIO/scripts/chitu_crypt.py b/buildroot/share/PlatformIO/scripts/chitu_crypt.py
index e2903a9cd2ae6322327f2a4ce0df8997ca7f223d..d706665e907b5336c392a6e501591fff2d37c6e8 100644
--- a/buildroot/share/PlatformIO/scripts/chitu_crypt.py
+++ b/buildroot/share/PlatformIO/scripts/chitu_crypt.py
@@ -113,8 +113,6 @@ def encrypt_file(input, output_file, file_length):
 
 # Encrypt ${PROGNAME}.bin and save it as 'update.cbd'
 def encrypt(source, target, env):
-    import os
-
     firmware = open(target[0].path, "rb")
     update = open(target[0].dir.path +'/update.cbd', "wb")
     length = os.path.getsize(target[0].path)
diff --git a/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py b/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
index 5af0e0038e7b0c17d1d5366073a8c6b5b7d8db3c..6c8a4f6034c2215e087613675abc4187efc98421 100644
--- a/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
+++ b/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
@@ -16,8 +16,6 @@ for i, flag in enumerate(env["LINKFLAGS"]):
 
 #append ${PROGNAME}.bin firmware after bootloader and save it as 'jgaurora_firmware.bin'
 def addboot(source,target,env):
-	import os
-
 	firmware = open(target[0].path, "rb")
 	lengthfirmware = os.path.getsize(target[0].path)
 	bootloader_dir = "buildroot/share/PlatformIO/scripts/jgaurora_bootloader.bin"
diff --git a/buildroot/share/PlatformIO/scripts/mks_robin.py b/buildroot/share/PlatformIO/scripts/mks_robin.py
index 7db27df4395e1d5a57d052fced77cf96fa148f1b..dd2342bf0df2c72511b0c8fdd2de58e5dc067a99 100644
--- a/buildroot/share/PlatformIO/scripts/mks_robin.py
+++ b/buildroot/share/PlatformIO/scripts/mks_robin.py
@@ -16,7 +16,6 @@ for i, flag in enumerate(env["LINKFLAGS"]):
 
 # Encrypt ${PROGNAME}.bin and save it as 'Robin.bin'
 def encrypt(source, target, env):
-    import os
     import sys
 
     key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E]
diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_lite.py b/buildroot/share/PlatformIO/scripts/mks_robin_lite.py
index 77d51518154fe954fe9bccca784928674e6730a9..2f3ae1fa9a1746505daa4009383654f065232e5c 100644
--- a/buildroot/share/PlatformIO/scripts/mks_robin_lite.py
+++ b/buildroot/share/PlatformIO/scripts/mks_robin_lite.py
@@ -17,7 +17,6 @@ for i, flag in enumerate(env["LINKFLAGS"]):
 
 # Encrypt ${PROGNAME}.bin and save it as 'mksLite.bin'
 def encrypt(source, target, env):
-    import os
     import sys
 
     key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E]
diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_mini.py b/buildroot/share/PlatformIO/scripts/mks_robin_mini.py
index b68f4a5e448c652bd827b20a91b759ab72d42e0c..d386698301583b45eeb5c53e8b1419aeaf7bfcdb 100755
--- a/buildroot/share/PlatformIO/scripts/mks_robin_mini.py
+++ b/buildroot/share/PlatformIO/scripts/mks_robin_mini.py
@@ -1,5 +1,4 @@
 import os
-
 Import("env")
 
 # Relocate firmware from 0x08000000 to 0x08007000
@@ -18,7 +17,6 @@ for i, flag in enumerate(env["LINKFLAGS"]):
 
 # Encrypt ${PROGNAME}.bin and save it as 'Robin_mini.bin'
 def encrypt(source, target, env):
-    import os
     import sys
 
     key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E]
diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_nano.py b/buildroot/share/PlatformIO/scripts/mks_robin_nano.py
index dcb2e09490ed7f9faf28ed5bb93a683f62e29c69..a68fd308d443b280d58bdb307d2a7453e7e599bb 100755
--- a/buildroot/share/PlatformIO/scripts/mks_robin_nano.py
+++ b/buildroot/share/PlatformIO/scripts/mks_robin_nano.py
@@ -17,7 +17,6 @@ for i, flag in enumerate(env["LINKFLAGS"]):
 
 # Encrypt ${PROGNAME}.bin and save it as 'Robin_nano.bin'
 def encrypt(source, target, env):
-    import os
     import sys
 
     key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E]