diff options
author | Yilei Yang <yileiyang@google.com> | 2017-09-25 09:11:24 -0700 |
---|---|---|
committer | Yilei Yang <yileiyang@google.com> | 2017-09-25 10:32:25 -0700 |
commit | e6e79faedf577e14291327d091d69a76682a1468 (patch) | |
tree | 5195f0a7d9c593065f98c8d2dc2e31e1527a9bc8 /absl/app.py | |
parent | 99d72774ba05271cf2aa6d9cf80da8508ae48d59 (diff) | |
download | absl-py-e6e79faedf577e14291327d091d69a76682a1468.tar.gz |
Use super(Class, self).
PiperOrigin-RevId: 169915592
Diffstat (limited to 'absl/app.py')
-rw-r--r-- | absl/app.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/absl/app.py b/absl/app.py index 5d65162..62dc656 100644 --- a/absl/app.py +++ b/absl/app.py @@ -85,7 +85,7 @@ class UsageError(Error): """ def __init__(self, message, exitcode=1): - Error.__init__(self, message) + super(UsageError, self).__init__(message) self.exitcode = exitcode @@ -95,9 +95,9 @@ class HelpFlag(flags.BooleanFlag): SHORT_NAME = '?' def __init__(self): - flags.BooleanFlag.__init__(self, self.NAME, False, 'show this help', - short_name=self.SHORT_NAME, - allow_hide_cpp=True) + super(HelpFlag, self).__init__( + self.NAME, False, 'show this help', + short_name=self.SHORT_NAME, allow_hide_cpp=True) def parse(self, arg): if arg: @@ -118,8 +118,8 @@ class HelpfullFlag(flags.BooleanFlag): """Display help for flags in this module and all dependent modules.""" def __init__(self): - flags.BooleanFlag.__init__(self, 'helpfull', False, 'show full help', - allow_hide_cpp=True) + super(HelpfullFlag, self).__init__( + 'helpfull', False, 'show full help', allow_hide_cpp=True) def parse(self, arg): if arg: @@ -131,9 +131,9 @@ class HelpXMLFlag(flags.BooleanFlag): """Similar to HelpfullFlag, but generates output in XML format.""" def __init__(self): - flags.BooleanFlag.__init__(self, 'helpxml', False, - 'like --helpfull, but generates XML output', - allow_hide_cpp=True) + super(HelpXMLFlag, self).__init__( + 'helpxml', False, 'like --helpfull, but generates XML output', + allow_hide_cpp=True) def parse(self, arg): if arg: |