Closed prokopto-dev closed 4 months ago
Gotcha. Makes sense, though I never encountered that myself. I merged your PR. Andrew On May 17, 2024, at 13:17, Courtney Caldwell @.***> wrote: Hey all; Just a small nit-pick, but when using packages like mypy, pylance, and pyright, the SSH_PORT variable grabbed from paramiko.client throws an error. Line in question is here: from paramiko.client import SSH_PORT, SSHClient The resolution is basically just to throw in another import line from the original source within paramiko.config: from paramiko.client import SSHClient from paramiko.config import SSH_PORT
Will attach a PR to this for the resolution.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
Appreciated, @andrewschenck ! It's because sometimes those tools don't follow non-definition imports in submodules, so since SSH_PORT
is defined in the Config submodule but imported into the Client submodule, some tools throw the error. More permissive typing implementations are perfectly fine with it, and sometimes there's config to allow it too;
Hey all;
Just a small nit-pick, but when using packages like
mypy
,pylance
, andpyright
, theSSH_PORT
variable grabbed fromparamiko.client
throws an error.Line in question is here:
The resolution is basically just to throw in another import line from the original source within
paramiko.config
:Will attach a PR to this for the resolution.