@@ -712,19 +712,19 @@ def __setitem__(self, id: _MessageID, message: Message) -> None:
712712 """Add or update the message with the specified ID.
713713
714714 >>> catalog = Catalog()
715- >>> catalog[u 'foo'] = Message(u 'foo')
716- >>> catalog[u 'foo']
717- <Message u 'foo' (flags: [])>
715+ >>> catalog['foo'] = Message('foo')
716+ >>> catalog['foo']
717+ <Message 'foo' (flags: [])>
718718
719719 If a message with that ID is already in the catalog, it is updated
720720 to include the locations and flags of the new message.
721721
722722 >>> catalog = Catalog()
723- >>> catalog[u 'foo'] = Message(u 'foo', locations=[('main.py', 1)])
724- >>> catalog[u 'foo'].locations
723+ >>> catalog['foo'] = Message('foo', locations=[('main.py', 1)])
724+ >>> catalog['foo'].locations
725725 [('main.py', 1)]
726- >>> catalog[u 'foo'] = Message(u 'foo', locations=[('utils.py', 5)])
727- >>> catalog[u 'foo'].locations
726+ >>> catalog['foo'] = Message('foo', locations=[('utils.py', 5)])
727+ >>> catalog['foo'].locations
728728 [('main.py', 1), ('utils.py', 5)]
729729
730730 :param id: the message ID
@@ -768,10 +768,10 @@ def add(
768768 """Add or update the message with the specified ID.
769769
770770 >>> catalog = Catalog()
771- >>> catalog.add(u 'foo')
771+ >>> catalog.add('foo')
772772 <Message ...>
773- >>> catalog[u 'foo']
774- <Message u 'foo' (flags: [])>
773+ >>> catalog['foo']
774+ <Message 'foo' (flags: [])>
775775
776776 This method simply constructs a `Message` object with the given
777777 arguments and invokes `__setitem__` with that object.
@@ -847,11 +847,11 @@ def update(
847847 >>> template.add(('salad', 'salads'), locations=[('util.py', 42)])
848848 <Message ...>
849849 >>> catalog = Catalog(locale='de_DE')
850- >>> catalog.add('blue', u 'blau', locations=[('main.py', 98)])
850+ >>> catalog.add('blue', 'blau', locations=[('main.py', 98)])
851851 <Message ...>
852- >>> catalog.add('head', u 'Kopf', locations=[('util.py', 33)])
852+ >>> catalog.add('head', 'Kopf', locations=[('util.py', 33)])
853853 <Message ...>
854- >>> catalog.add(('salad', 'salads'), (u 'Salat', u 'Salate'),
854+ >>> catalog.add(('salad', 'salads'), ('Salat', 'Salate'),
855855 ... locations=[('util.py', 38)])
856856 <Message ...>
857857
@@ -866,13 +866,13 @@ def update(
866866
867867 >>> msg2 = catalog['blue']
868868 >>> msg2.string
869- u 'blau'
869+ 'blau'
870870 >>> msg2.locations
871871 [('main.py', 100)]
872872
873873 >>> msg3 = catalog['salad']
874874 >>> msg3.string
875- (u 'Salat', u 'Salate')
875+ ('Salat', 'Salate')
876876 >>> msg3.locations
877877 [('util.py', 42)]
878878
0 commit comments