comparison i18n/polib.py @ 48946:642e31cb55f0

py3: use class X: instead of class X(object): The inheritance from object is implied in Python 3. So this should be equivalent. This change was generated via an automated search and replace. So there may have been some accidental changes. Differential Revision: https://phab.mercurial-scm.org/D12352
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Feb 2022 13:08:28 -0700
parents 6000f5b25c9b
children 493034cc3265
comparison
equal deleted inserted replaced
48945:55d132525155 48946:642e31cb55f0
40 try: 40 try:
41 import io 41 import io
42 except ImportError: 42 except ImportError:
43 # replacement of io.open() for python < 2.6 43 # replacement of io.open() for python < 2.6
44 # we use codecs instead 44 # we use codecs instead
45 class io(object): 45 class io:
46 @staticmethod 46 @staticmethod
47 def open(fpath, mode='r', encoding=None): 47 def open(fpath, mode='r', encoding=None):
48 return codecs.open(fpath, mode, encoding) 48 return codecs.open(fpath, mode, encoding)
49 49
50 50
814 814
815 # }}} 815 # }}}
816 # class _BaseEntry {{{ 816 # class _BaseEntry {{{
817 817
818 818
819 class _BaseEntry(object): 819 class _BaseEntry:
820 """ 820 """
821 Base class for :class:`~polib.POEntry` and :class:`~polib.MOEntry` classes. 821 Base class for :class:`~polib.POEntry` and :class:`~polib.MOEntry` classes.
822 This class should **not** be instanciated directly. 822 This class should **not** be instanciated directly.
823 """ 823 """
824 824
1225 1225
1226 # }}} 1226 # }}}
1227 # class _POFileParser {{{ 1227 # class _POFileParser {{{
1228 1228
1229 1229
1230 class _POFileParser(object): 1230 class _POFileParser:
1231 """ 1231 """
1232 A finite state machine to parse efficiently and correctly po 1232 A finite state machine to parse efficiently and correctly po
1233 file format. 1233 file format.
1234 """ 1234 """
1235 1235
1704 1704
1705 # }}} 1705 # }}}
1706 # class _MOFileParser {{{ 1706 # class _MOFileParser {{{
1707 1707
1708 1708
1709 class _MOFileParser(object): 1709 class _MOFileParser:
1710 """ 1710 """
1711 A class to parse binary mo files. 1711 A class to parse binary mo files.
1712 """ 1712 """
1713 1713
1714 def __init__(self, mofile, *args, **kwargs): 1714 def __init__(self, mofile, *args, **kwargs):