Skip to content

Commit

Permalink
fix ruff checks
Browse files Browse the repository at this point in the history
  • Loading branch information
schumannj committed Jan 2, 2025
1 parent 63d911f commit d8f5407
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/nomad_catalysis/schema_packages/catalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,11 @@ def map_and_assign_attributes(self, logger, mapping, target, obj=None) -> None:
)


threshold_conc = 1.1


def check_if_concentration_in_percentage(self, conc_array, logger) -> None:
if conc_array is not None and any(y > 1.1 for y in conc_array):
if conc_array is not None and any(y > threshold_conc for y in conc_array):
logger.error(
f'Gas concentration for reagent "{self.name}" is above 1, '
f'but should be given as fraction.'
Expand Down

0 comments on commit d8f5407

Please sign in to comment.