Skip to content

AeroProblem should throw an error when an unsupported kwarg is passed into the initialization #94

@gawng

Description

@gawng

Description

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.

  1. 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.
  2. 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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions