1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 05:48:43 +00:00

🔨 Clean up Python imports (#24736)

This commit is contained in:
dmitrygribenchuk 2022-09-05 21:19:19 +03:00 committed by Scott Lahteine
parent cc2cc7d081
commit 63507acf98
12 changed files with 7 additions and 13 deletions

View File

@ -4,7 +4,6 @@
import pioutil import pioutil
if pioutil.is_pio_build(): if pioutil.is_pio_build():
import os
Import("env", "projenv") Import("env", "projenv")
flash_size = 0 flash_size = 0

View File

@ -3,7 +3,6 @@
# #
import pioutil import pioutil
if pioutil.is_pio_build(): if pioutil.is_pio_build():
import os
from os.path import join from os.path import join
from os.path import expandvars from os.path import expandvars
Import("env") Import("env")

View File

@ -5,7 +5,6 @@
import json import json
import sys import sys
import shutil import shutil
import re
opt_output = '--opt' in sys.argv opt_output = '--opt' in sys.argv
output_suffix = '.sh' if opt_output else '' if '--bare-output' in sys.argv else '.gen' output_suffix = '.sh' if opt_output else '' if '--bare-output' in sys.argv else '.gen'

View File

@ -10,7 +10,7 @@
# #
import pioutil import pioutil
if pioutil.is_pio_build(): if pioutil.is_pio_build():
import sys,marlin import marlin
env = marlin.env env = marlin.env
board = env.BoardConfig() board = env.BoardConfig()

View File

@ -3,7 +3,6 @@
# #
import pioutil import pioutil
if pioutil.is_pio_build(): if pioutil.is_pio_build():
import os,sys
from os.path import join from os.path import join
Import("env") Import("env")

View File

@ -5,7 +5,7 @@
import pioutil import pioutil
if pioutil.is_pio_build(): if pioutil.is_pio_build():
import os,re,sys import re,sys
from pathlib import Path from pathlib import Path
Import("env") Import("env")

View File

@ -1,7 +1,7 @@
# #
# preprocessor.py # preprocessor.py
# #
import subprocess,re import subprocess
nocache = 1 nocache = 1
verbose = 0 verbose = 0

View File

@ -18,7 +18,6 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
#---------------------------------------------------------------- #----------------------------------------------------------------
import os
import os.path import os.path
import argparse import argparse
import DWIN_ICO import DWIN_ICO

View File

@ -18,7 +18,6 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
#---------------------------------------------------------------- #----------------------------------------------------------------
import os
import os.path import os.path
import argparse import argparse
import DWIN_ICO import DWIN_ICO

View File

@ -22,8 +22,8 @@
# Generate Marlin TFT Images from bitmaps/PNG/JPG # Generate Marlin TFT Images from bitmaps/PNG/JPG
import sys,re,struct import sys,struct
from PIL import Image,ImageDraw from PIL import Image
def image2bin(image, output_file): def image2bin(image, output_file):
if output_file.endswith(('.c', '.cpp')): if output_file.endswith(('.c', '.cpp')):

View File

@ -13,7 +13,7 @@
from __future__ import print_function from __future__ import print_function
from __future__ import division from __future__ import division
import subprocess,os,sys,platform import subprocess,os,platform
from SCons.Script import DefaultEnvironment from SCons.Script import DefaultEnvironment
current_OS = platform.system() current_OS = platform.system()

View File

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