spines.versioning.core¶
Core classes for the spines versioning subpackage.
-
class
spines.versioning.core.
ClassSignature
(obj: [<class 'type'>, <class 'object'>])[source]¶ Bases:
spines.versioning.base.Signature
Signature for classes
-
functions
¶ Function names and signatures for this class
- Type
dict
-
properties
¶ Properties and their signatures for this class
- Type
dict
-
-
class
spines.versioning.core.
FunctionSignature
(obj: function)[source]¶ Bases:
spines.versioning.base.Signature
Signature class for versioning individual functions.
-
arguments
¶ The signature function’s argument specifications
- Type
OrderedDict
-
return_type
¶ The function’s return type specification (if any)
- Type
type
-
similar
(other: Type[FunctionSignature], strict: bool = False) → bool[source]¶ Compares this FunctionSignature to another for similarity
Similarity is defined as having the same number and types of parameters and the same return type, regardless of the naming conventions used for each.
- Parameters
other (FunctionSignature) – The other function signature to compare with.
strict (bool, optional) – Whether or not the types must be the same or if subclasses are permittable (the default is
False
, subclasses are also acceptable).
- Returns
Whether or not the two functions are similar (as defined above).
- Return type
bool
-