1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212# See the License for the specific language governing permissions and
1313# limitations under the License.
14-
1514"""Factory interface and concrete factory for connecting to Reach host."""
1615
1716import importlib
17+ import pathlib
1818from typing import Dict , Any , Optional , List
1919
2020import pyreach
@@ -71,12 +71,12 @@ class WebRTCHostFactory(HostFactory):
7171 """Factory for connecting to Reach using webrtc."""
7272
7373 _robot_id : str
74- _working_directory : Optional [str ]
74+ _working_directory : Optional [pathlib . Path ]
7575 _kwargs : Any
7676
7777 def __init__ (self ,
7878 robot_id : str ,
79- working_directory : Optional [str ] = None ,
79+ working_directory : Optional [pathlib . Path ] = None ,
8080 reach_connect_arguments : Optional [List [str ]] = None ,
8181 ** kwargs : Any ) -> None :
8282 """Construct a WebRTCHostFactory object.
@@ -109,15 +109,15 @@ def connect(self) -> pyreach.Host:
109109 raise pyreach .PyReachError ()
110110
111111 fn = getattr (mod , 'reach_connect_webrtc' )
112- return fn (self ._robot_id , self ._working_directory , True ,
112+ return fn (self ._robot_id , self ._working_directory , True , True ,
113113 self ._reach_connect_arguments , self ._kwargs )
114114
115115
116116class RemoteTCPHostFactory (HostFactory ):
117117 """Factory for connecting to Reach using remote tcp."""
118118
119119 _robot_id : str
120- _working_directory : Optional [str ]
120+ _working_directory : Optional [pathlib . Path ]
121121 _connect_host : Optional [str ]
122122 _connect_port : Optional [int ]
123123 _kwargs : Any
@@ -126,7 +126,7 @@ def __init__(self,
126126 robot_id : str ,
127127 connect_host : Optional [str ] = None ,
128128 connect_port : Optional [int ] = 50009 ,
129- working_directory : Optional [str ] = None ,
129+ working_directory : Optional [pathlib . Path ] = None ,
130130 reach_connect_arguments : Optional [List [str ]] = None ,
131131 ** kwargs : Any ) -> None :
132132 """Construct a RemoteTCPHostFactory object.
@@ -164,7 +164,7 @@ def connect(self) -> pyreach.Host:
164164
165165 fn = getattr (mod , 'reach_connect_remote_tcp' )
166166 return fn (self ._robot_id , self ._connect_host , self ._connect_port ,
167- self ._working_directory , self ._reach_connect_arguments ,
167+ self ._working_directory , True , self ._reach_connect_arguments ,
168168 self ._kwargs )
169169
170170
0 commit comments