<commit_before>from opentrons_sdk.util.log import debug
from opentrons_sdk.protocol.handlers import ProtocolHandler
import opentrons_sdk.drivers.motor as motor_drivers


class MotorControlHandler(ProtocolHandler):

    _driver = None
    _pipette_motors = None  # {axis: PipetteMotor}

    def setup(self):
        self._pipette_motors = {}

    def set_driver(self, driver):
        self._driver = driver

    def connect(self, port):
        """
        Connects the MotorControlHandler to a serial port.

        If a device connection is set, then any dummy or alternate motor
        drivers are replaced with the serial driver.
        """
        self.set_driver(motor_drivers.OpenTrons())
        self._driver.connect(device=port)
<commit_msg>connect returns true/false<commit_after>from opentrons_sdk.util.log import debug
from opentrons_sdk.protocol.handlers import ProtocolHandler
import opentrons_sdk.drivers.motor as motor_drivers


class MotorControlHandler(ProtocolHandler):

    _driver = None
    _pipette_motors = None  # {axis: PipetteMotor}

    def setup(self):
        self._pipette_motors = {}

    def set_driver(self, driver):
        self._driver = driver

    def connect(self, port):
        """
        Connects the MotorControlHandler to a serial port.

        If a device connection is set, then any dummy or alternate motor
        drivers are replaced with the serial driver.
        """
        self.set_driver(motor_drivers.OpenTrons())
        return self._driver.connect(device=port)

{'fraction_non_alphanumeric': 0.07293035479632064, 'fraction_numerical': 0.0, 'mean_word_length': 3.1498637602179835, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4433929', 'n_tokens_mistral': 450, 'n_tokens_neox': 423, 'n_words': 121}