Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In python: 'SmartCardConnection' is not declared in __all__ #622

Open
RunYouCleverBoy opened this issue Jul 20, 2024 · 1 comment
Open

Comments

@RunYouCleverBoy
Copy link

  • YubiKey Manager (ykman) version:
    latest yubikey-manager~=5.5.1

  • How was it installed?:

pip install yubikey-manager
  • Operating system and version:
    mac os - sonoma, PyCharm

  • YubiKey model and version:
    Not relevant

  • Bug description summary:
    Annoying warning 'SmartCardConnection' is not declared in all

Slows on PyCharm.

Steps to reproduce
Simply

  1. create a new project
  2. pip install yubikey-manager
  3. in the python file :
from yubikit.core.smartcard import SmartCardConnection
  1. It is necessary for the use of piv:
with self.device.open_connection(SmartCardConnection) as conn:
   piv = PivSession(conn)
   ...

Apparently, SmartCardConnection is not "exported to the world" because it does not appear in __all__.

Your all is defined:

__all__ = ["ApduError", "ApduFormat", "SW", "AID"]
  • Expected result
    Either add it to all or suggest an alternative.

  • Actual results and logs
    Not relevant

Thanks 🙇

@dainnilsson
Copy link
Member

Thanks, this will be addressed in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants