Skip to content

Commit 554c8a6

Browse files
committed
rename to gs1_128
1 parent b628f09 commit 554c8a6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

barcode/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"""
1313

1414
from barcode.errors import BarcodeNotFoundError
15-
from barcode.codex import Code39, PZN, Code128, Gs1128
15+
from barcode.codex import Code39, PZN, Code128, Gs1_128
1616
from barcode.ean import EAN8, EAN13, EAN14, JAN
1717
from barcode.isxn import ISBN10, ISBN13, ISSN
1818
from barcode.upc import UPCA
@@ -43,7 +43,7 @@
4343
pzn=PZN,
4444
code128=Code128,
4545
itf=ITF,
46-
gs1128=Gs1128,
46+
gs1_128=Gs1_128,
4747
)
4848

4949
PROVIDED_BARCODES = list(__BARCODE_MAP)

barcode/codex.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def render(self, writer_options=None, text=None):
258258
return Barcode.render(self, options, text)
259259

260260

261-
class Gs1128(Code128):
261+
class Gs1_128(Code128):
262262
"""
263263
following the norm, a gs1-128 barcode is a subset of code 128 barcode,
264264
it can be generated by prepending the code with the FNC1 character
@@ -272,10 +272,10 @@ class Gs1128(Code128):
272272

273273
def __init__(self, code, writer=None):
274274
code = self.FNC1_CHAR + code
275-
super(Gs1128, self).__init__(code, writer)
275+
super(Gs1_128, self).__init__(code, writer)
276276

277277
def get_fullcode(self):
278-
return super(Gs1128, self).get_fullcode()[1:]
278+
return super(Gs1_128, self).get_fullcode()[1:]
279279

280280

281281
# For pre 0.8 compatibility

test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def test_isbn13(self):
150150
self.assertEqual('9783769260854', isbn.get_fullcode())
151151

152152
def test_gs1_128(self):
153-
gs1_128 = get_barcode('gs1128', '00376401856400470087')
153+
gs1_128 = get_barcode('gs1_128', '00376401856400470087')
154154
self.assertEqual('00376401856400470087', gs1_128.get_fullcode())
155155

156156

0 commit comments

Comments
 (0)