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

refactor: rename SupportSchema -> SchemaLike, fix type definition #8427

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

jcrist
Copy link
Member

@jcrist jcrist commented Feb 22, 2024

This is a follow-up to #8421.

  • The use of a TypeVar here was incorrect - what you want is a TypeAlias instead. The previous version would cause type checkers to error.
  • I moved the type definition to be adjacent to Schema. This makes the import paths cleaner since you don't need as many if TYPE_CHECKING blocks. Logically it also makes sense to me to put the union of schema-like things next to the Schema code.
  • I renamed the type alias to SchemaLike which reads better IMO.

Copy link
Member

@cpcloud cpcloud left a comment

Choose a reason for hiding this comment

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

Thanks!

@cpcloud cpcloud added this to the 9.0 milestone Feb 22, 2024
@cpcloud cpcloud added ux User experience related issues datatypes Issues relating to ibis's datatypes (under `ibis.expr.datatypes`) labels Feb 22, 2024
@cpcloud cpcloud enabled auto-merge (squash) February 22, 2024 17:12
@cpcloud cpcloud merged commit ad1f53a into ibis-project:main Feb 22, 2024
78 checks passed
@jcrist jcrist deleted the fix-supports-schema branch February 22, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datatypes Issues relating to ibis's datatypes (under `ibis.expr.datatypes`) ux User experience related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants