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

contains and keys were giving inconsistent results #1935

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

ljeub-pometry
Copy link
Collaborator

What changes were proposed in this pull request?

Fixes a panic exception in python for constant properties

    g = Graph()
    g.add_edge(0, 1, 2, layer="a")
    g.add_edge(0, 1, 2)
    g.edge(1, 2).add_constant_properties({"test": 1})
    constant_exploded = g.layer("a").edges.explode().properties.constant.values() # used to panic here!

Why are the changes needed?

bug due to keys and contains having inconsistent results

Does this PR introduce any user-facing change? If yes is this documented?

No

How was this patch tested?

Added a test for the above example in python

Are there any further changes required?

Copy link
Collaborator

@miratepuffin miratepuffin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@miratepuffin miratepuffin merged commit b355d45 into master Jan 28, 2025
19 checks passed
@miratepuffin miratepuffin deleted the fix/constant_properties_panic branch January 28, 2025 09:53
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.

2 participants