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

Always return dict for custom metadata #132

Merged
merged 2 commits into from
Mar 22, 2024
Merged

Always return dict for custom metadata #132

merged 2 commits into from
Mar 22, 2024

Conversation

dennisvang
Copy link
Owner

@dennisvang dennisvang commented Mar 22, 2024

Always return a dict from TargetMeta.custom and custom_internal (instead optional dict).

This breaks any code that explicitly relies on the possibility that custom metadata is None, for example:

if my_meta.custom is None:
    # this will never happen...
    ...

Code that simply checks for custom metadata, as in if my_meta.custom: ..., or if my_meta.custom is not None: ..., is not affected.

fixes #131

always return dict from TargetMeta.custom and custom_internal

and fix tests accordingly
undo rename test file
@dennisvang dennisvang merged commit 9650662 into master Mar 22, 2024
17 checks passed
dennisvang added a commit that referenced this pull request Apr 19, 2024
there's a minor api change in #132 that may affect some users
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.

Custom metadata should always return a dict
1 participant