Skip to content

paramiko: make Transport.open_sftp_client return type non-optional - #16567

Merged
srittau merged 1 commit into
python:mainfrom
jacobglikz:fix-paramiko-open-sftp-client-return-type
Oct 20, 2026
Merged

srittau merged 1 commit into
python:mainfrom
jacobglikz:fix-paramiko-open-sftp-client-return-type

Conversation

@jacobglikz

Copy link
Copy Markdown
Contributor

open_sftp_client is unable to return None as it calls from_transport -> open_session -> open_channel, which itself returns either a Channel or throws.

@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

scipy-stubs (https://github.com/scipy/scipy-stubs)
+ tests/misc/test_submodules_empty.pyi:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

@srittau
srittau merged commit c2d1138 into python:main Oct 20, 2026
74 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