Skip to content

Wrong return type hint for load_dict #67

@kthy

Description

@kthy
  • SDK Version: 1.3.0
  • Connect Server Version: 1.6.0
  • OS: ubuntu-22.04
  • Python Version: 3.10

What happened?

The type hint for the return value of load_dict is Dict[str, str] (as stated in config.py line 60) but the actual return type is dict[str, str | None], or dict[str, Optional[str]] if you prefer.

How to reproduce

Add a text field with no value to an item in 1Password. It will not be shown in the client, but when you click Edit you can see it is still there; you can also verify this with e.g. curl.

Then call load_dict and you will see that the value of the field is None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as expected. Has never worked before. When it has, use "regression" instead.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions