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

Improved get_attribute_access_type #3156

Merged
merged 7 commits into from
Apr 27, 2024

Conversation

benedikt-bartscher
Copy link
Contributor

@benedikt-bartscher benedikt-bartscher commented Apr 24, 2024

  • Allow parsing of bare python class type annotations
  • Add support for sqlalchemy array types
  • Improved sqlalchemy type annotation parsing for Optional and Iterable
  • Add basic tests for get_attribute_access_type

@benedikt-bartscher benedikt-bartscher changed the title wip improved attribute-access-type Improved get_attribute_access_type Apr 24, 2024
@benedikt-bartscher benedikt-bartscher marked this pull request as ready for review April 24, 2024 16:12
@picklelo picklelo merged commit c2017b2 into reflex-dev:main Apr 27, 2024
46 checks passed
@Lendemor
Copy link
Collaborator

Lendemor commented May 21, 2024

This is throwing a warning when used with pd.DataFrame, on code that used to work fine.

See this example for a repro:

class BasicState(rx.State):
    df: pd.DataFrame = pd.DataFrame(["C", "D"])

@rx.page()
def index():
    return rx.fragment()

@benedikt-bartscher
Copy link
Contributor Author

benedikt-bartscher commented May 21, 2024

Warning: Failed to resolve ForwardRefs for <class 'pandas.core.frame.DataFrame'>.get_setter_name due to name
'SingleBlockManager' is not defined
Warning: Failed to resolve ForwardRefs for <class 'pandas.core.frame.DataFrame'>.get_setter due to name
'SingleBlockManager' is not defined
Warning: Failed to resolve ForwardRefs for <class 'pandas.core.frame.DataFrame'>.get_setter_name due to name
'SingleBlockManager' is not defined

This pr just made it visible. For me the big question is, why does reflex try to get the attribute type of get_setter_name and get_setter

@benedikt-bartscher
Copy link
Contributor Author

#3357

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.

4 participants