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

Improve item class getting #100

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Conversation

M1troll
Copy link
Contributor

@M1troll M1troll commented Nov 29, 2024

After the previous pomcorn 0.8.1 update, we encountered two issues:

  • TypeAlias passed in first generic parametter don't pass is_valid_item_class check
  • We could not use ListComponent as a parameterized type
    Example:
    class List[ListComponent[TItemClass, TPage]]:...
    list_component = List[ItemClass, Page]

In this commit, we improved getting _item_class for a parameterized ListComponent
and added support for TypeAlias in is_valid_item_class + added tests for these cases.

After the previous pomcorn 0.8.1 update, we
encountered two issues:

* TypeAlias passed in first generic parametter don't
pass `is_valid_item_class` check
* We could not use `ListComponent` as a
parameterized type (e.g.,
`list_component = List[ItemClass, Page]`).

In this commit, we improved getting `_item_class`
for a parameterized `ListComponent` and added
support for TypeAlias in `is_valid_item_class`.
We also added tests for these cases.
@M1troll M1troll self-assigned this Nov 29, 2024
@M1troll M1troll marked this pull request as ready for review November 29, 2024 11:00
@M1troll M1troll merged commit 767be78 into main Dec 18, 2024
1 check passed
@M1troll M1troll deleted the feature/improve-item-class-getting branch December 18, 2024 04:36
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.

3 participants