spines.versioning¶
Versioning subpackage for spines.
-
class
spines.versioning.
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.
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
-
-
class
spines.versioning.
SourceMixin
(obj: [<class 'type'>, <class 'object'>])[source]¶ Bases:
abc.ABC
Source mixin for storing source code of Signature object’s
-
source
¶ Source code for the signature’s object.
- Type
str
-
-
class
spines.versioning.
PropertySignature
(obj: property, name: str)[source]¶ Bases:
spines.versioning.base.Signature
Signature for properties
-
deleter
¶ Signature for this property’s fdel
- Type
-
getter
¶ Signature for this property’s fget
- Type
-
setter
¶ Signature for this property’s fset
- Type
-
-
class
spines.versioning.
VersionMixin
(obj)[source]¶ Bases:
abc.ABC
Version mixin for versioning Signature objects.
-
description
¶ Description for the main object versioned.
- Type
str
-
slug
¶ Slugified version of this version object
- Type
str
-
spines_version
¶ Version of spines this version object was created with
- Type
str
-
version
¶ Version string for this version object.
- Type
str
-