MCPcopy Index your code
hub / github.com/lincolnloop/python-qrcode / make

Method make

qrcode/main.py:148–160  ·  view source on GitHub ↗

Compile the data into a QR Code array. :param fit: If ``True`` (or if a size has not been provided), find the best fit for the data to avoid data overflow errors.

(self, fit=True)

Source from the content-addressed store, hash-verified

146 self.data_cache = None
147
148 def make(self, fit=True):
149 """
150 Compile the data into a QR Code array.
151
152 :param fit: If ``True`` (or if a size has not been provided), find the
153 best fit for the data to avoid data overflow errors.
154 """
155 if fit or (self.version is None):
156 self.best_fit(start=self.version)
157 if self.mask_pattern is None:
158 self.makeImpl(False, self.best_mask_pattern())
159 else:
160 self.makeImpl(False, self.mask_pattern)
161
162 def makeImpl(self, test, mask_pattern):
163 self.modules_count = self.version * 4 + 17

Callers 15

print_ttyMethod · 0.95
print_asciiMethod · 0.95
make_imageMethod · 0.95
get_matrixMethod · 0.95
test_basicFunction · 0.95
test_largeFunction · 0.95
test_overflowFunction · 0.95
test_add_qrdataFunction · 0.95
test_fitFunction · 0.95
test_mode_numberFunction · 0.95
test_mode_alphaFunction · 0.95

Calls 3

best_fitMethod · 0.95
makeImplMethod · 0.95
best_mask_patternMethod · 0.95

Tested by 14

test_basicFunction · 0.76
test_largeFunction · 0.76
test_overflowFunction · 0.76
test_add_qrdataFunction · 0.76
test_fitFunction · 0.76
test_mode_numberFunction · 0.76
test_mode_alphaFunction · 0.76
test_mode_8bitFunction · 0.76
test_mode_8bit_newlineFunction · 0.76
test_optimizeFunction · 0.76
test_optimize_shortFunction · 0.76