-
Notifications
You must be signed in to change notification settings - Fork 155
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
Use a consistent method for empty object creation process #761
Labels
bug
Something isn't working
Comments
rafmudaf
changed the title
Use one process for empty object creation process
Use a consistent method for empty object creation process
Dec 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use one process for empty object creation process
In the course of resolving the issue with mutable types as default parameters in attrs classes within FLORIS in pull request #759, @RHammond2 points out that we need to pick a consistent method for empty object creation. Currently, we are at risk that if in the future we implement type checking, we could fail tests.
@RHammond2 says:
For instances like this below, I would recommend modifying slightly to ensure the typing is valid (even if unchecked currently) to use the following paragdigm:
Essentially what will happen if typing is implemented, without converting to the array type, it will fail. Additionally it creates some confusion (though some already exists tbc) to create a list for an object indicated to be an array.
The only place this will cause issues is with non-float arrays, in which case I'd recommend having two variations of
floris_array_converter
such asfloat_array_converter
andobject_array_converter
. I don't know that it needs to havefloris_
at the front at this point, and might be a lingering (but dated) idea from early in the design process.The text was updated successfully, but these errors were encountered: