comicbox.formats.base.fields.number_fields ¶
Marshmallow number fields.
BooleanField ¶
Bases: Boolean
A liberally parsed boolean field.
Source code in comicbox/formats/base/fields/number_fields.py
163 164 | |
DecimalField ¶
Bases: Decimal, RangedNumberMixin[Decimal]
Durable Decimal field that parses some fractions.
Source code in comicbox/formats/base/fields/number_fields.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
__init__(*args, minimum=None, maximum=None, **kwargs) ¶
Set the min and max value.
Source code in comicbox/formats/base/fields/number_fields.py
127 128 129 130 131 132 133 134 135 136 | |
parse_str(num_obj) classmethod ¶
Fix half glyphs.
Source code in comicbox/formats/base/fields/number_fields.py
113 114 115 116 117 118 119 120 121 122 123 124 125 | |
IntegerField ¶
Bases: Integer, RangedNumberMixin[int]
Durable integer field.
Source code in comicbox/formats/base/fields/number_fields.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
__init__(*args, minimum=None, maximum=None, **kwargs) ¶
Set the min and max value.
Source code in comicbox/formats/base/fields/number_fields.py
85 86 87 88 89 90 91 92 93 94 | |
parse_str(num_obj) classmethod ¶
Parse the first number out of volume.
Source code in comicbox/formats/base/fields/number_fields.py
73 74 75 76 77 78 79 80 81 82 83 | |
RangedNumberMixin ¶
Bases: Generic[NumT]
Number range methods.
Source code in comicbox/formats/base/fields/number_fields.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
parse_str(num_obj) classmethod ¶
Parse numerical string method.
Source code in comicbox/formats/base/fields/number_fields.py
38 39 40 41 | |
SignedDecimalField ¶
Bases: DecimalField
A decimal that keeps a leading minus sign.
Issue -1 is a real issue number; DecimalField reads only digits, so its “-1” was 1.
Source code in comicbox/formats/base/fields/number_fields.py
152 153 154 155 156 157 158 159 160 | |