Skip to content

Commit

Permalink
improve type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
jornbr committed Oct 21, 2024
1 parent 13332fa commit 9ed3b9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pyfabm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ def _update_configuration(self, settings: Optional[Tuple] = None):
+ self.horizontal_dependencies
+ self.scalar_dependencies
)
self.variables = (
self.variables: NamedObjectList[VariableFromPointer] = (
self.state_variables + self.diagnostic_variables + self.dependencies
)

Expand All @@ -1422,7 +1422,7 @@ def _update_configuration(self, settings: Optional[Tuple] = None):

self.itime = -1.0

def getRates(self, t: float = None, surface: bool = True, bottom: bool = True):
def getRates(self, t: Optional[float] = None, surface: bool = True, bottom: bool = True):
"""Returns the local rate of change in state variables,
given the current state and environment.
"""
Expand Down Expand Up @@ -1459,7 +1459,7 @@ def getRates(self, t: float = None, surface: bool = True, bottom: bool = True):

def get_sources(
self,
t: float = None,
t: Optional[float] = None,
out: Optional[Tuple[np.ndarray, np.ndarray, np.ndarray]] = None,
) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
if t is None:
Expand Down

0 comments on commit 9ed3b9e

Please sign in to comment.