mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:23 +00:00
[S507] fix doc recommended fix (#9347)
paramiko `set_missing_host_key_policy` has mandatory positional arg. The [current documentation](https://docs.astral.sh/ruff/rules/ssh-no-host-key-verification/#example) leads to non-running code ``` >>> from paramiko import client >>> ssh_client = client.SSHClient() >>> ssh_client.set_missing_host_key_policy() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: SSHClient.set_missing_host_key_policy() missing 1 required positional argument: 'policy' ``` This PR modifies the documentation to set the policy to the [default `RejectPolicy`](https://docs.paramiko.org/en/latest/api/client.html#paramiko.client.SSHClient.set_missing_host_key_policy) Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
This commit is contained in:
parent
0a0020583f
commit
d0a1e201a3
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ use crate::checkers::ast::Checker;
|
|||
/// from paramiko import client
|
||||
///
|
||||
/// ssh_client = client.SSHClient()
|
||||
/// ssh_client.set_missing_host_key_policy()
|
||||
/// ssh_client.set_missing_host_key_policy(client.RejectPolicy)
|
||||
/// ```
|
||||
///
|
||||
/// ## References
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue