Skip to content

Conversation

jonglezb
Copy link
Contributor

Checking both Paramiko and Telnetlib, all those parameters are actually float.

Only self.timeout seems to be used as an int in Netmiko itself, so it's left unchanged.

@jonglezb
Copy link
Contributor Author

The CI fails when type-checking keepalive: netmiko/base_connection.py:1212: error: Argument 1 to "set_keepalive" of "Transport" has incompatible type "float"; expected "int" [arg-type]

I believe this is a mistake in typeshed, because keepalive can definitely be a float (it is compared to time.time())

I just opened python/typeshed#14596 to fix this in typeshed.

Checking both Paramiko and Telnetlib, all those parameters are actually float.

Only self.timeout seems to be used as an int in Netmiko itself, so it's
left unchanged.

The keepalive parameters was wrongly typed as an integer in typeshed, this
has been fixed in python/typeshed#14596
@jonglezb
Copy link
Contributor Author

With the new release 4.0.0.20250821 of types-paramiko, everything is green!

@ktbyers ktbyers merged commit d64db0a into ktbyers:develop Aug 28, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants