jenkins-bot submitted this change.
[IMPR] remove "else" after return or raise
Change-Id: Ibe9b4d7e4362b16db5b5490d822d3567ae8a7187
---
M pywikibot/comms/http.py
M pywikibot/data/superset.py
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index a61d464..24c4728 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -436,8 +436,8 @@
pip install requests_oauthlib
""")
- else:
- auth = requests_oauthlib.OAuth1(*auth)
+
+ auth = requests_oauthlib.OAuth1(*auth)
timeout = config.socket_timeout
diff --git a/pywikibot/data/superset.py b/pywikibot/data/superset.py
index 2da5a10..20ee653 100644
--- a/pywikibot/data/superset.py
+++ b/pywikibot/data/superset.py
@@ -126,9 +126,9 @@
if self.last_response.status_code == 200:
return self.last_response.json()['result']
- else:
- status_code = self.last_response.status_code
- raise ServerError(f'CSRF token error: {status_code}')
+
+ status_code = self.last_response.status_code
+ raise ServerError(f'CSRF token error: {status_code}')
def get_database_id_by_schema_name(self, schema_name: str) -> int:
"""Get superset database_id using superset schema name.
To view, visit change 1052379. To unsubscribe, or for help writing mail filters, visit settings.