-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Summary
When creating a class which inherits from paramiko.SSHClient and then using self.set_missing_host_key_policy(paramiko.AutoAddPolicy), the linter rule is not triggered. The same applies when creating an instance of the custom class and calling the function there.
I have included an example:
import paramiko
ssh_client = paramiko.SSHClient()
ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy) # triggers rule
class Test(paramiko.SSHClient):
def __init__(self):
super().__init__()
self.set_missing_host_key_policy(paramiko.AutoAddPolicy) # does not trigger rule
client = Test()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy) # also doesn't trigger ruleYou can check it by pasting my python snippet into a file and then using the following command:
ruff check --select S507 ./path/to/file.pyVersion
ruff 0.14.4
Metadata
Metadata
Assignees
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule