Pylint cleanups (#15626)

* Pylint 2 no-else-return fixes

* Remove unneeded abstract-class-not-used pylint disable
This commit is contained in:
Ville Skyttä authored and Paulus Schoutsen committed 2018-07-23 10:16:05 +02:00
1 parent a38c0d6d15
commit b7c336a687
166 files changed
+425 -490

No files matched your search

+7 -8
View File
@@ -83,7 +83,7 @@ def mocked_requests_get(*args, **kwargs):
"id": 12
}
], 200)
elif 'api/command' in url:
if 'api/command' in url:
return MockResponse([
{
"name": "RescanMovie",
@@ -94,7 +94,7 @@ def mocked_requests_get(*args, **kwargs):
"id": 24
}
], 200)
elif 'api/movie' in url:
if 'api/movie' in url:
return MockResponse([
{
"title": "Assassin's Creed",
@@ -149,7 +149,7 @@ def mocked_requests_get(*args, **kwargs):
"id": 1
}
], 200)
elif 'api/diskspace' in url:
if 'api/diskspace' in url:
return MockResponse([
{
"path": "/data",
@@ -158,7 +158,7 @@ def mocked_requests_get(*args, **kwargs):
"totalSpace": 499738734592
}
], 200)
elif 'api/system/status' in url:
if 'api/system/status' in url:
return MockResponse({
"version": "0.2.0.210",
"buildTime": "2017-01-22T23:12:49Z",
@@ -182,10 +182,9 @@ def mocked_requests_get(*args, **kwargs):
"(Stable 4.6.1.3/abb06f1 "
"Mon Oct 3 07:57:59 UTC 2016)")
}, 200)
else:
return MockResponse({
"error": "Unauthorized"
}, 401)
return MockResponse({
"error": "Unauthorized"
}, 401)
class TestRadarrSetup(unittest.TestCase):
+9 -10
View File
@@ -139,7 +139,7 @@ def mocked_requests_get(*args, **kwargs):
"id": 14402
}
], 200)
elif 'api/command' in url:
if 'api/command' in url:
return MockResponse([
{
"name": "RescanSeries",
@@ -150,7 +150,7 @@ def mocked_requests_get(*args, **kwargs):
"id": 24
}
], 200)
elif 'api/wanted/missing' in url or 'totalRecords' in url:
if 'api/wanted/missing' in url or 'totalRecords' in url:
return MockResponse(
{
"page": 1,
@@ -325,7 +325,7 @@ def mocked_requests_get(*args, **kwargs):
}
]
}, 200)
elif 'api/queue' in url:
if 'api/queue' in url:
return MockResponse([
{
"series": {
@@ -449,7 +449,7 @@ def mocked_requests_get(*args, **kwargs):
"id": 1503378561
}
], 200)
elif 'api/series' in url:
if 'api/series' in url:
return MockResponse([
{
"title": "Marvel's Daredevil",
@@ -540,7 +540,7 @@ def mocked_requests_get(*args, **kwargs):
"id": 7
}
], 200)
elif 'api/diskspace' in url:
if 'api/diskspace' in url:
return MockResponse([
{
"path": "/data",
@@ -549,7 +549,7 @@ def mocked_requests_get(*args, **kwargs):
"totalSpace": 499738734592
}
], 200)
elif 'api/system/status' in url:
if 'api/system/status' in url:
return MockResponse({
"version": "2.0.0.1121",
"buildTime": "2014-02-08T20:49:36.5560392Z",
@@ -568,10 +568,9 @@ def mocked_requests_get(*args, **kwargs):
"startOfWeek": 0,
"urlBase": ""
}, 200)
else:
return MockResponse({
"error": "Unauthorized"
}, 401)
return MockResponse({
"error": "Unauthorized"
}, 401)
class TestSonarrSetup(unittest.TestCase):