Skip to content

Commit 87a8fbd

Browse files
committed
Pylint has been updated => less false-negative
1 parent 7eae4a2 commit 87a8fbd

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

exec_helpers/_ssh_base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@ def __build_connection_chain(self) -> _SSHConnChainT:
367367
conn_chain.append((config, auth))
368368

369369
while config.proxyjump is not None:
370-
# pylint: disable=no-member
371370
config = self.ssh_config[config.proxyjump]
372371
default_auth = ssh_auth.SSHAuth(username=config.user, key_filename=config.identityfile)
373372
conn_chain.append((config, self.__auth_mapping.get(config.hostname, default_auth)))

exec_helpers/_ssh_helpers.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ def _parse_paramiko_ssh_config(conf: paramiko.SSHConfig, host: str) -> HostsSSHC
412412
:return: parsed dictionary with proxy jump path, if available
413413
:rtype: HostsSSHConfigs
414414
"""
415-
# pylint: disable=no-member,unsubscriptable-object,unsupported-assignment-operation
416415
config = HostsSSHConfigs({host: SSHConfig.from_ssh_config(conf.lookup(host))})
417416
config.setdefault(config[host].hostname, config[host])
418417

@@ -434,7 +433,6 @@ def _parse_dict_ssh_config(conf: SSHConfigsDictT, host: str) -> HostsSSHConfigs:
434433
:return: parsed dictionary with proxy jump path, if available
435434
:rtype: HostsSSHConfigs
436435
"""
437-
# pylint: disable=no-member,unsubscriptable-object,unsupported-assignment-operation
438436
config = HostsSSHConfigs({host: SSHConfig.from_ssh_config(conf.get(host, {"hostname": host}))})
439437
config.setdefault(config[host].hostname, config[host])
440438

@@ -488,7 +486,6 @@ def parse_ssh_config(
488486
config = HostsSSHConfigs({host: SSHConfig(host)})
489487

490488
if user_ssh_config is not None:
491-
# pylint: disable=no-member,unsubscriptable-object,unsupported-assignment-operation
492489
user_config = _parse_paramiko_ssh_config(user_ssh_config, host)
493490
for hostname, cfg in user_config.items():
494491
config[hostname] = config[hostname].overridden_by(cfg)

exec_helpers/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def __enter__(self) -> ExecHelper:
234234
235235
.. versionchanged:: 1.1.0 lock on enter
236236
"""
237-
self.lock.acquire()
237+
self.lock.acquire() # pylint: disable=consider-using-with
238238
return self
239239

240240
def __exit__(self, exc_type: typing.Any, exc_val: typing.Any, exc_tb: typing.Any) -> None:

exec_helpers/ssh_auth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def __setitem__(self, hostname: str, auth: SSHAuth) -> None:
365365
raise TypeError(f"Hostname should be string only! Got: {hostname!r}")
366366
if not isinstance(auth, SSHAuth): # pragma: no cover
367367
raise TypeError(f"Value {auth!r} is not SSHAuth object!")
368-
super().__setitem__(hostname.lower(), auth) # pylint: disable=no-member
368+
super().__setitem__(hostname.lower(), auth)
369369

370370
def __getitem__(self, hostname: str) -> SSHAuth:
371371
"""Dict-like access.
@@ -378,7 +378,7 @@ def __getitem__(self, hostname: str) -> SSHAuth:
378378
"""
379379
if not isinstance(hostname, str): # pragma: no cover
380380
raise TypeError(f"Hostname should be string only! Got: {hostname!r}")
381-
return super().__getitem__(hostname.lower()) # pylint: disable=no-member
381+
return super().__getitem__(hostname.lower())
382382

383383
@typing.overload
384384
def get_with_alt_hostname(
@@ -436,4 +436,4 @@ def __delitem__(self, hostname: str) -> None:
436436
"""
437437
if not isinstance(hostname, str): # pragma: no cover
438438
raise TypeError(f"Hostname should be string only! Got: {hostname!r}")
439-
super().__delitem__(hostname.lower()) # pylint: disable=no-member
439+
super().__delitem__(hostname.lower())

0 commit comments

Comments
 (0)