Mercurial > hg
diff 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 |
line wrap: on
line diff
--- a/i18n/polib.py Mon Feb 21 13:03:43 2022 -0700 +++ b/i18n/polib.py Mon Feb 21 13:08:28 2022 -0700 @@ -42,7 +42,7 @@ except ImportError: # replacement of io.open() for python < 2.6 # we use codecs instead - class io(object): + class io: @staticmethod def open(fpath, mode='r', encoding=None): return codecs.open(fpath, mode, encoding) @@ -816,7 +816,7 @@ # class _BaseEntry {{{ -class _BaseEntry(object): +class _BaseEntry: """ Base class for :class:`~polib.POEntry` and :class:`~polib.MOEntry` classes. This class should **not** be instanciated directly. @@ -1227,7 +1227,7 @@ # class _POFileParser {{{ -class _POFileParser(object): +class _POFileParser: """ A finite state machine to parse efficiently and correctly po file format. @@ -1706,7 +1706,7 @@ # class _MOFileParser {{{ -class _MOFileParser(object): +class _MOFileParser: """ A class to parse binary mo files. """