1
- # Copyright (c) 2010-2023 Emmanuel Blot <[email protected] >
1
+ # Copyright (c) 2010-2024 Emmanuel Blot <[email protected] >
2
2
# Copyright (c) 2016 Emmanuel Bouaziz <[email protected] >
3
3
# All rights reserved.
4
4
#
21
21
from .misc import to_bool
22
22
from .usbtools import UsbDeviceDescriptor , UsbTools
23
23
24
- #pylint: disable-msg=invalid-name
25
- #pylint: disable-msg=too-many-arguments
26
- #pylint: disable=too-many-arguments
27
- #pylint: disable=too-many-branches
28
- #pylint: disable=too-many-statements
29
- #pylint: disable=too-many-nested-blocks
30
- #pylint: disable=too-many-instance-attributes
31
- #pylint: disable=too-many-nested-blocks
32
- #pylint: disable=too-many-public-methods
33
- #pylint: disable=too-many-locals
34
- #pylint: disable=too-many-lines
24
+ # pylint: disable=invalid-name
35
25
36
26
37
27
class FtdiError (IOError ):
@@ -730,13 +720,13 @@ def open_mpsse_from_device(self, device: UsbDevice,
730
720
:param bool debug: add more debug traces
731
721
:return: actual bus frequency in Hz
732
722
"""
733
- # pylint: disable-msg =unused-argument
723
+ # pylint: disable=unused-argument
734
724
self .open_from_device (device , interface )
735
725
if not self .is_mpsse_interface (interface ):
736
726
self .close ()
737
727
raise FtdiMpsseError ('This interface does not support MPSSE' )
738
728
if to_bool (tracer ): # accept strings as boolean
739
- #pylint: disable-msg =import-outside-toplevel
729
+ # pylint: disable=import-outside-toplevel
740
730
from .tracer import FtdiMpsseTracer
741
731
self ._tracer = FtdiMpsseTracer (self .device_version )
742
732
self .log .debug ('Using MPSSE tracer' )
@@ -2044,7 +2034,7 @@ def _set_interface(self, config: UsbConfiguration, ifnum: int):
2044
2034
except (NotImplementedError , USBError ):
2045
2035
pass
2046
2036
2047
- #pylint: disable-msg =protected-access
2037
+ # pylint: disable=protected-access
2048
2038
# need to access private member _ctx of PyUSB device (resource manager)
2049
2039
# until PyUSB #302 is addressed
2050
2040
@@ -2057,7 +2047,7 @@ def _is_pyusb_handle_active(self) -> bool:
2057
2047
# and there is no public API for this.
2058
2048
return bool (self ._usb_dev ._ctx .handle )
2059
2049
2060
- #pylint: enable-msg=protected-access
2050
+ # pylint: enable-msg=protected-access
2061
2051
2062
2052
def _reset_device (self ):
2063
2053
"""Reset the FTDI device (FTDI vendor command)"""
0 commit comments