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

Method setup_position_probe_pattern

qrcode/main.py:190–206  ·  view source on GitHub ↗
(self, row, col)

Source from the content-addressed store, hash-verified

188 self.map_data(self.data_cache, mask_pattern)
189
190 def setup_position_probe_pattern(self, row, col):
191 for r in range(-1, 8):
192 if row + r <= -1 or self.modules_count <= row + r:
193 continue
194
195 for c in range(-1, 8):
196 if col + c <= -1 or self.modules_count <= col + c:
197 continue
198
199 if (
200 (0 <= r <= 6 and c in {0, 6})
201 or (0 <= c <= 6 and r in {0, 6})
202 or (2 <= r <= 4 and 2 <= c <= 4)
203 ):
204 self.modules[row + r][col + c] = True
205 else:
206 self.modules[row + r][col + c] = False
207
208 def best_fit(self, start=None):
209 """

Callers 1

makeImplMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected