We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afe780a commit 582969aCopy full SHA for 582969a
1 file changed
barcode/writer.py
@@ -180,16 +180,16 @@ def packed(self, line):
180
line += " "
181
c = 1
182
for i in range(0, len(line) - 1):
183
- if line[i] == line[i + 1]:
184
- c += 1
185
- else:
186
- if line[i] == "1":
187
- yield (c, 1)
188
- elif line[i] == "G":
189
- yield (c, self.guard_height_factor)
190
191
- yield (-c, self.guard_height_factor)
192
- c = 1
+ if line[i] == line[i + 1]:
+ c += 1
+ else:
+ if line[i] == "1":
+ yield (c, 1)
+ elif line[i] == "G":
+ yield (c, self.guard_height_factor)
+ yield (-c, self.guard_height_factor)
+ c = 1
193
194
def render(self, code):
195
"""Renders the barcode to whatever the inheriting writer provides,
0 commit comments