We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm getting flagged for S601 on the following code even though I've added sanitization of the command.
from paramiko import SSHClient from shlex import join as shlex.join ... class RemoteConnectionClass: ... def _create_ssh_client_conn(self, dbs_name: str, ssh_client=SSHClient) -> SSHClient: """Create, connect, and return ssh client.""" ssh_client = ssh_client() ... return ssh_client def run_cmd(self, cmd: list[str], target_node: str, output_as_list=False, std_out_timeout=DEFAULT_TIMEOUT) -> (str or [str], int): ssh_client = self._create_ssh_client_conn(target_node) # S601 is flagged for the following line std_in, std_out, std_err = ssh_client.exec_command(shlex_join(cmd)) std_out.channel.settimeout(std_out_timeout) exit_code = std_out.channel.recv_exit_status() output = std_out.readlines() if output_as_list else std_out.read().decode() return output, exit_code
python 3.10.0 on macos Ventura 13.0.1 paramiko 2.9.5
Is there a recognized sanitization, or do I have to comment it with # noqa: S601 because it is already santized ?
# noqa: S601 because it is already santized
Thanks,
Dave
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm getting flagged for S601 on the following code even though I've added sanitization of the command.
python 3.10.0 on macos Ventura 13.0.1
paramiko 2.9.5
Is there a recognized sanitization, or do I have to comment it with
# noqa: S601 because it is already santized
?Thanks,
Dave
The text was updated successfully, but these errors were encountered: