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)
| 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 |