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

fix(typing): update common typing to skip non-existent attributes #10666

Closed
wants to merge 5 commits into from

Conversation

millsks
Copy link

@millsks millsks commented Jan 10, 2025

Update common typing to skip attributes when attempting to load properties for various data type objects and do not exist.

Resolves #10665

Skipping a property if the attribute is not available
Copy link
Contributor

ACTION NEEDED

Ibis follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message.

Please update your PR title and description to match the specification.

Testing the typing module in ibis.common
@github-actions github-actions bot added the tests Issues or PRs related to tests label Jan 10, 2025
@millsks millsks changed the title fix(typing): Update common typing to skip non-existent attributes fix(typing): update common typing to skip non-existent attributes Jan 10, 2025

def test_get_type_hints_with_attribute_error():
hints = get_type_hints(TestClass, include_properties=True)
assert hints == {"a": int, "b": str}
Copy link
Member

Choose a reason for hiding this comment

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

This is failing because the attribute error isn't raised until accessing an instance property, but the function that extracts these properties operates on classes, not instances.

@cpcloud
Copy link
Member

cpcloud commented Feb 21, 2025

I don't think we have enough information about the original issue to warrant a solution yet. Let's discuss on the original issue if you're still interested in fixing this.

@cpcloud cpcloud closed this Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Issues or PRs related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Hamilton pipeline loading ibis extension produces AttributeError: __provide__ when running on Windows
2 participants