Flake8 bugbear fixes (#12072)

* Don't use mutable argument defaults (bugbear B006)

* Use callable(x) instead of hasattr(x, '__call__') (bugbear B004)

* Remove/mark unused loop control variables (bugbear B007)

* Fix stripping protocol from kodi host name (bugbear B005)

* Fix plant daily history add default date (bugbear B008)
This commit is contained in:
Ville Skyttä authored and Paulus Schoutsen committed 2018-01-30 14:44:05 -08:00
1 parent 37034a7450
commit cab6c694c5
15 files changed
+23 -22

No files matched your search

+2 -2
View File
@@ -97,7 +97,7 @@ class AiohttpClientMockResponse:
"""Mock Aiohttp client response."""
def __init__(self, method, url, status, response, cookies=None, exc=None,
headers={}):
headers=None):
"""Initialize a fake response."""
self.method = method
self._url = url
@@ -107,7 +107,7 @@ class AiohttpClientMockResponse:
self.response = response
self.exc = exc
self._headers = headers
self._headers = headers or {}
self._cookies = {}
if cookies: