Skip to content

Commit f231b4a

Browse files
committed
Dropped Python 2 specific comments that no longer apply
1 parent 73bf147 commit f231b4a

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

discid/util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def _encode(string: str | bytes) -> bytes:
3535

3636
def _decode(byte_string: bytes | str) -> str:
3737
"""Decode byte string to (unicode) string"""
38-
# this test for bytes works on Python 2 and 3
3938
if isinstance(byte_string, bytes):
4039
return byte_string.decode()
4140
elif isinstance(byte_string, str):

test_discid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class DiscTestData:
7373

7474
class TestModulePrivate(unittest.TestCase):
7575
# lots of encoding tests
76-
# not part of the actual API, but this is quite different in Python 2/3
76+
# not part of the actual API, but used internally to handle both bytes and str
7777
def test_encode(self):
7878
self.assertTrue(type(discid.util._encode("test")) is bytes)
7979
self.assertEqual(discid.util._encode("test"), b"test")

0 commit comments

Comments
 (0)