typingtools¶
This module implements some “types” to be used for static (and eventually dynamical) typing.
Module typingtools
implements the following members:
ArrayFloat
Type variable.
Float1
Type variable.
Float2
Type variable.
Float_co
Type variable.
Name
Type for strings that represent names.
P
Parameter specification variable.
T
Type variable.
T1
Type variable.
T2
Type variable.
T3
Type variable.
T_co
Type variable.
T_contra
Type variable.
SharableConfiguration
Specification of the configuration data that main models can share with their submodels.
CyParametersProtocol
The protocol for the parameters attribute of Cython extension classes.
CySequencesProtocol
The protocol for the sequences attribute of Cython extension classes.
CyModelProtocol
The protocol of Cython extension classes for defining efficient model implementations.
CySubstepModelProtocol
The protocol of Cython extension classes for defining efficient model implementations compatible with classSubstepModel
.
- class hydpy.core.typingtools.AbstractContextManager[source]¶
Bases:
ABC
An abstract base class for context managers.
- class hydpy.core.typingtools.CyModelProtocol(*args, **kwargs)[source]¶
Bases:
Protocol
The protocol of Cython extension classes for defining efficient model implementations.
Class
Cythonizer
generates the actual, model-specific implementations automatically.- parameters: CyParametersProtocol¶
- sequences: CySequencesProtocol¶
- class hydpy.core.typingtools.CySubstepModelProtocol(*args, **kwargs)[source]¶
Bases:
CyModelProtocol
The protocol of Cython extension classes for defining efficient model implementations compatible with class
SubstepModel
.Class
Cythonizer
generates the actual, model-specific implementations automatically.
- class hydpy.core.typingtools.SharableConfiguration[source]¶
Bases:
TypedDict
Specification of the configuration data that main models can share with their submodels.
- landtype_constants: parametertools.Constants | None¶
Land cover type-related constants.
- soiltype_constants: parametertools.Constants | None¶
Soil type-related constants.
- landtype_refindices: parametertools.NameParameter | None¶
Reference to a land cover type-related index parameter.
- soiltype_refindices: parametertools.NameParameter | None¶
Reference to a soil type-related index parameter.
- refweights: parametertools.Parameter | None¶
Reference to a weighting parameter (probably handling the size of some computational subunits like the area of hydrological response units).