Skip to content

FR: Type Stubs #220

Open
NixOS/nixpkgs
#526222

Description

@mahyarmirrashed

Use Case

I frequently get type stub warnings for the SDK. Is it possible to ship with them?

Requirements and desired behavior

No response

Additional information

No response

Activity

  1. petersuttondev commented on May 20, 2026

    @petersuttondev

    The code is typed in-line (i.e., type hints are in the .py files, rather than separate .pyi files). The package is missing a py.typed in it's root directory. After installing the SDK into my venv, I touch venv/lib/python3.14/site-packages/onepassword/py.typed and everything is happy.

  2. mahyarmirrashed commented on May 20, 2026

    @mahyarmirrashed
    Author

    Thanks for that @petersuttondev . Is there any way that we can get py.typed included in the package? I can try to create a PR that addresses this.

  3. petersuttondev commented on May 21, 2026

    @petersuttondev

    It's very obvious that this is an AI reply. If you were a human you'd already have picked up that my reply contains the solution. Please stop wasting everyone's time with bot replies.

  4. mahyarmirrashed commented on May 21, 2026

    @mahyarmirrashed
    Author

    I'm sorry, what? I'm a little insulted. That was actually just me typing...

  5. mahyarmirrashed commented on May 21, 2026

    @mahyarmirrashed
    Author

    A little rude, don't you think?

  6. mahyarmirrashed commented on May 21, 2026

    @mahyarmirrashed
    Author

    Why would I have a bot to reply to GitHub comments for me???

  7. petersuttondev commented on May 21, 2026

    @petersuttondev

    Hi, if that was just you typing, I apologise. I've had lot of my time wasted with AI recently so I snapped too quickly and for that I'm sorry. If you'd like to create a PR for this on a basic level all you need to do is add an empty py.typed file to the package root. But it's something that 1password have to do themselves because by doing that they're committed to their type hints as part of their public API.

  8. mahyarmirrashed commented on May 21, 2026

    @mahyarmirrashed
    Author

    Thanks, and I understand that sentiment. Me as well.

  9. mahyarmirrashed commented on May 21, 2026

    @mahyarmirrashed
    Author

    Yea, fair enough. I'll create the PR then for it and then hopefully someone from their team accepts it.

  10. mahyarmirrashed commented on May 21, 2026

    @mahyarmirrashed
    Author

    I'll ping them on their Slack about it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions