mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 13:34:01 -06:00
Fixes for all of the plugins. Added a script to invoke mypy. (I'm stiiiick of .bat files. They are just broken.)
This commit is contained in:
parent
fb70eb6813
commit
1b43e4981e
12 changed files with 62 additions and 20 deletions
|
@ -2,7 +2,7 @@
|
|||
# Cura is released under the terms of the AGPLv3 or higher.
|
||||
|
||||
from .avr_isp import stk500v2, ispBase, intelHex
|
||||
import serial
|
||||
import serial # type: ignore
|
||||
import threading
|
||||
import time
|
||||
import queue
|
||||
|
|
|
@ -258,7 +258,7 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension):
|
|||
def getSerialPortList(self, only_list_usb = False):
|
||||
base_list = []
|
||||
if platform.system() == "Windows":
|
||||
import winreg #@UnresolvedImport
|
||||
import winreg # type: ignore @UnresolvedImport
|
||||
try:
|
||||
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE,"HARDWARE\\DEVICEMAP\\SERIALCOMM")
|
||||
i = 0
|
||||
|
@ -277,4 +277,4 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension):
|
|||
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.*") + glob.glob("/dev/tty.usb*") + glob.glob("/dev/rfcomm*") + glob.glob("/dev/serial/by-id/*")
|
||||
return list(base_list)
|
||||
|
||||
_instance = None
|
||||
_instance = None # type: "USBPrinterOutputDeviceManager"
|
||||
|
|
|
@ -7,7 +7,7 @@ import struct
|
|||
import sys
|
||||
import time
|
||||
|
||||
from serial import Serial
|
||||
from serial import Serial # type: ignore
|
||||
from serial import SerialException
|
||||
from serial import SerialTimeoutException
|
||||
from UM.Logger import Logger
|
||||
|
@ -184,7 +184,7 @@ class Stk500v2(ispBase.IspBase):
|
|||
|
||||
def portList():
|
||||
ret = []
|
||||
import _winreg
|
||||
import _winreg # type: ignore
|
||||
key=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,"HARDWARE\\DEVICEMAP\\SERIALCOMM") #@UndefinedVariable
|
||||
i=0
|
||||
while True:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue