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

Allow None Type for Element Properties in _api_generator.py #2145

Closed
wants to merge 6 commits into from

Conversation

naaa760
Copy link

@naaa760 naaa760 commented Oct 24, 2024

Description of Changes Made to _api_generator.py

  • Modified create_element_api Method:
    Implemented logic to adjust property types, allowing None values to be represented as "none" in the _TYPES dictionary.
    This ensures that elements can handle cases where properties may not have a specified type, improving flexibility for developers.

  • Overall Goal:
    Enhance usability by allowing properties without explicit types, preventing potential errors related to type handling during element creation.

@FabienLelaquais
Copy link
Member

FabienLelaquais commented Oct 24, 2024

Hey @naaa760 and thank you for your proposal.
I kind of understand what you're doing here (although I think we don't need to create this temporary dictionary, and that the dict comprehension could do the job).
However, I don't know of any use case of the 'properties without explicit types' situation... Did I miss an issue on this one?
Thanks!

@FredLL-Avaiga
Copy link
Member

Are you still working on this @naaa760 ?

  • if you are, please update your branch and resolve the conflicts
  • if you are not, please close this PR

@FredLL-Avaiga
Copy link
Member

No activity, closing

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