diff --git a/src/nomad_simulations/utils/utils.py b/src/nomad_simulations/utils/utils.py index e48a5118..49cc2beb 100644 --- a/src/nomad_simulations/utils/utils.py +++ b/src/nomad_simulations/utils/utils.py @@ -133,7 +133,7 @@ def is_not_representative(model_system, logger: BoundLogger): # cannot define typing with `Variables` due to circular import issue def get_variables( - variables: Optional[List[ArchiveSection]], variable_cls: ArchiveSection + variables: List[ArchiveSection], variable_cls: ArchiveSection ) -> List[ArchiveSection]: """ Get the list of variables which are of type `variable_cls` and appear under `variables`. @@ -145,8 +145,6 @@ def get_variables( Returns: (List[Variables]): The list of variables which are of type `variable_cls`. """ - if variables is None: - return [] result = [] for var in variables: if isinstance(var, variable_cls):