mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2026-08-31 09:41:08 +00:00
Tweaked a few comments.
This commit is contained in:
+3
-3
@@ -614,9 +614,9 @@ class QrCode(object):
|
||||
return z
|
||||
|
||||
|
||||
# Can only be called immediately after a white run is added, and
|
||||
# returns either 0, 1, or 2. A helper function for _get_penalty_score().
|
||||
def _finder_penalty_count_patterns(self, runhistory):
|
||||
"""Can only be called immediately after a white run is added, and
|
||||
returns either 0, 1, or 2. A helper function for _get_penalty_score()."""
|
||||
n = runhistory[1]
|
||||
assert n <= self._size * 3
|
||||
core = n > 0 and (runhistory[2] == runhistory[4] == runhistory[5] == n) and runhistory[3] == n * 3
|
||||
@@ -624,8 +624,8 @@ class QrCode(object):
|
||||
+ (1 if (core and runhistory[6] >= n * 4 and runhistory[0] >= n) else 0)
|
||||
|
||||
|
||||
# Must be called at the end of a line (row or column) of modules. A helper function for _get_penalty_score().
|
||||
def _finder_penalty_terminate_and_count(self, currentruncolor, currentrunlength, runhistory):
|
||||
"""Must be called at the end of a line (row or column) of modules. A helper function for _get_penalty_score()."""
|
||||
if currentruncolor: # Terminate black run
|
||||
runhistory.appendleft(currentrunlength)
|
||||
currentrunlength = 0
|
||||
|
||||
Reference in New Issue
Block a user