def __init__(self,
                 loop: asyncio.AbstractEventLoop = None,
                 hardware: hc.API = None,
                 broker=None) -> None:
        """ Build a :py:class:`.ProtocolContext`.

        :param loop: An event loop to use. If not specified, this ctor will
                     (eventually) call :py:meth:`asyncio.get_event_loop`.
        """
        super().__init__(broker)
        self._loop = loop or asyncio.get_event_loop()
        self._deck_layout = geometry.Deck()
        self._instruments: Dict[types.Mount, Optional[InstrumentContext]]\
            = {mount: None for mount in types.Mount}
        self._last_moved_instrument: Optional[types.Mount] = None
        self._location_cache: Optional[types.Location] = None

        self._hw_manager = ProtocolContext.HardwareManager(hardware)
        self._log = MODULE_LOG.getChild(self.__class__.__name__)
        self._commands: List[str] = []
        self._unsubscribe_commands = None
        self.clear_commands()

        if fflags.short_fixed_trash():
            trash_name = 'opentrons_1_trash_0.85_l'
        else:
            trash_name = 'opentrons_1_trash_1.1_l'

        self.load_labware_by_name(
            trash_name, '12')
def __init__ ( self , loop : asyncio . AbstractEventLoop = None , hardware : hc . API = None , broker = None ) -> None : super ( ) . __init__ ( broker ) self . _loop = loop or asyncio . get_event_loop ( ) self . _deck_layout = geometry . Deck ( ) self . _instruments : Dict [ types . Mount , Optional [ InstrumentContext ] ] = { mount : None for mount in types . Mount } self . _last_moved_instrument : Optional [ types . Mount ] = None self . _location_cache : Optional [ types . Location ] = None self . _hw_manager = ProtocolContext . HardwareManager ( hardware ) self . _log = MODULE_LOG . getChild ( self . __class__ . __name__ ) self . _commands : List [ str ] = [ ] self . _unsubscribe_commands = None self . clear_commands ( ) if fflags . short_fixed_trash ( ) : trash_name = 'opentrons_1_trash_0.85_l' else : trash_name = 'opentrons_1_trash_1.1_l' self . load_labware_by_name ( trash_name , '12' )
Build a :py:class:`.ProtocolContext`.

        :param loop: An event loop to use. If not specified, this ctor will
                     (eventually) call :py:meth:`asyncio.get_event_loop`.