From 9035525954ed05bb17b77f5f120abc7ef198c03a Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Sun, 8 Oct 2023 20:39:59 -0400 Subject: [PATCH] added docstrings --- festim/stepsize.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/festim/stepsize.py b/festim/stepsize.py index a4331856c..ec0cb341e 100644 --- a/festim/stepsize.py +++ b/festim/stepsize.py @@ -99,7 +99,16 @@ def adapt(self, t, nb_it, converged): ): self.value.assign((next_milestone - t)) - def next_milestone(self, current_time): + def next_milestone(self, current_time: float): + """Returns the next milestone that the simulation must pass. + Returns None if there are no more milestones. + + Args: + current_time (float): current time. + + Returns: + float: next milestone. + """ if self.milestones is None: return None for milestone in self.milestones: