Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Feb 17, 2023
1 parent 3b7a572 commit e8d78a8
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pybamm/experiments/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,23 +422,19 @@ def _detect_mistyped_temperatures(self, cond):
raise ValueError(f"Temperature not written correctly on step: '{cond}'")

def _read_and_drop_temperature(self, cond):

matches = re.findall(r"at\s-*\d+\.*\d*\s*oC", cond)

if len(matches) == 0:

self._detect_mistyped_temperatures(cond)

if self.temperature is None:

pybamm.logger.warning(
"Temperature not found on step: "
f"'{cond}', using temperature "
"from parameter values."
)

else:

pybamm.logger.warning(
f"Temperature not found on step: '{cond}', "
f"using global temperature "
Expand Down

0 comments on commit e8d78a8

Please sign in to comment.