You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Andrew from AERO740 found that when xref, not xRef is passed into AeroProblem(), the initialization is just fine even though nothing is happening.
I think baseclasses should return an error.
This could be modifying the AeroProblem python code to check a list of all supported keyword arguments. Return an error if the supplied arg does not exist in the supported keyword arguments.
Another method could be changing the function signature of the __init__() to list out all the kwargs.
I am open to hearing other approaches too.
Steps to reproduce issue
Something like ap = AeroProblem(args=args, unsupportedArg=randomValue)
or rather ap = AeroProblem(xref=0.5) does not return an error that you're not setting xRef as intended
Current behavior
…
Does not throw an error for unsupported keyword arguments in AeroProblem instantiation.
Expected behavior
…
Throw an error for unsupported keyword argument
Code versions
Operating System:
Python:
OpenMPI:
CGNS:
PETSc:
Compiler:
This repository:
The text was updated successfully, but these errors were encountered:
Following up on this, my preference is listing all the args and kwargs in the __init__() definition because Python will handle the error automatically. If we add any other form of checking the code addition will be similar. We should do this for all of the Problem classes as well.
Description
Andrew from AERO740 found that when
xref
, notxRef
is passed intoAeroProblem()
, the initialization is just fine even though nothing is happening.I think baseclasses should return an error.
__init__()
to list out all the kwargs.I am open to hearing other approaches too.
Steps to reproduce issue
Something like
ap = AeroProblem(args=args, unsupportedArg=randomValue)
or rather
ap = AeroProblem(xref=0.5)
does not return an error that you're not settingxRef
as intendedCurrent behavior
…
Does not throw an error for unsupported keyword arguments in AeroProblem instantiation.
Expected behavior
…
Throw an error for unsupported keyword argument
Code versions
The text was updated successfully, but these errors were encountered: