Gmail.py removed parent class in super calls

In Python 3 we don't need specify the class for these calls, the MRO find it.
This commit is contained in:
Rodolfo García Peñas (kix) 2020-11-01 09:02:09 +01:00
parent 3f7e9fe1bd
commit c2fce5de38

View File

@ -40,7 +40,7 @@ class GmailRepository(IMAPRepository):
We first check the usual IMAP settings, and then fall back to We first check the usual IMAP settings, and then fall back to
imap.gmail.com if nothing is specified.""" imap.gmail.com if nothing is specified."""
try: try:
return super(GmailRepository, self).gethost() return super().gethost()
except OfflineImapError: except OfflineImapError:
# Nothing was configured, cache and return hardcoded # Nothing was configured, cache and return hardcoded
# one. See the parent class (IMAPRepository) for how this # one. See the parent class (IMAPRepository) for how this
@ -55,7 +55,7 @@ class GmailRepository(IMAPRepository):
https://accounts.google.com/o/oauth2/token if nothing is https://accounts.google.com/o/oauth2/token if nothing is
specified.""" specified."""
url = super(GmailRepository, self).getoauth2_request_url() url = super().getoauth2_request_url()
if url is None: if url is None:
# Nothing was configured, cache and return hardcoded one. # Nothing was configured, cache and return hardcoded one.
self.setoauth2_request_url("https://accounts.google.com/o/oauth2/token") self.setoauth2_request_url("https://accounts.google.com/o/oauth2/token")
@ -69,7 +69,7 @@ class GmailRepository(IMAPRepository):
This Gmail implementation first checks for the usual IMAP settings This Gmail implementation first checks for the usual IMAP settings
and falls back to 993 if nothing is specified.""" and falls back to 993 if nothing is specified."""
port = super(GmailRepository, self).getport() port = super().getport()
if port is not None: if port is not None:
return port return port