Skip to content

Add _missing_ method to enums where used in try-except #4622

Description

@clmould

In #4599 , found that ConfinementRadiationLossModel, ConfinementTimeModel, PlasmaCurrentModel, PlasmaGeometryModelType are all used in try-except blocks to see if their value is valid (see, eg, L273 in plasma_current.py). A _missing_ method should be added to these enums to check if the value is valid (see SuperconductingTFTurnType), and the try-except blocks in the models can be removed

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions