File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed
Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -204,11 +204,10 @@ def _thread__client(self) -> None:
204204 default = None ,
205205 help = "IPv4 gateway address to be assigned to the interface." ,
206206)
207- @click .option (
208- "--remote-ip-address " ,
207+ @click .argument (
208+ "remote_ip_address " ,
209209 type = ClickTypeIpAddress (),
210210 required = True ,
211- help = "Remote IP address to be pinged." ,
212211)
213212def cli (
214213 * ,
@@ -249,6 +248,10 @@ def cli(
249248 local_ip_address = ip4_host .address if ip4_host else Ip4Address (),
250249 remote_ip_address = remote_ip_address ,
251250 )
251+ case _:
252+ raise ValueError (
253+ f"Unsupported IP version: { remote_ip_address .version } "
254+ )
252255
253256 try :
254257 stack .start ()
Original file line number Diff line number Diff line change @@ -181,11 +181,10 @@ def _thread__client(self) -> None:
181181 default = None ,
182182 help = "IPv4 gateway address to be assigned to the interface." ,
183183)
184- @click .option (
185- "--remote-ip-address " ,
184+ @click .argument (
185+ "remote_ip_address " ,
186186 type = ClickTypeIpAddress (),
187187 required = True ,
188- help = "Remote IP address of the TCP Echo server." ,
189188)
190189def cli (
191190 * ,
Original file line number Diff line number Diff line change @@ -162,11 +162,10 @@ def _thread__client(self) -> None:
162162 default = None ,
163163 help = "IPv4 gateway address to be assigned to the interface." ,
164164)
165- @click .option (
166- "--remote-ip-address " ,
165+ @click .argument (
166+ "remote_ip_address " ,
167167 type = ClickTypeIpAddress (),
168168 required = True ,
169- help = "Remote IP address of the UDP Echo server." ,
170169)
171170def cli (
172171 * ,
Original file line number Diff line number Diff line change 1212ipython
1313pyupgrade
1414parameterized
15+ types-click
You can’t perform that action at this time.
0 commit comments