Skip to content

paramiko stubs seem incorrect for python3 #5736

Closed
@mrodden

Description

@mrodden

I am getting a bunch of errors from mypy with the types-paramiko package.

Some are imports that are not in the stubs for paramiko like paramiko.PublicBlob which is an alias import from paramiko.pkey.PublicBlob (see https://github.com/paramiko/paramiko/blob/master/paramiko/__init__.py#L65)

Others seem to be issues between python2 and python3 where many of the object stubs are declaring type str when in fact paramiko is treating it like a bytes (see https://github.com/python/typeshed/blob/master/stubs/paramiko/paramiko/pkey.pyi#L36 and https://github.com/paramiko/paramiko/blob/master/paramiko/pkey.py#L679-L681)

I'm not sure if there is a nice way to resolve this, as it is obviously an str in py2 but bytes in py3.

I have currently chosen to ignore the types-paramiko package in my project, as it causes too many false check errors with mypy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedAn actionable problem of low to medium complexity where a PR would be very welcome

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions