mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-16 14:30:26 +00:00
Bump pylint from 2.5.3 to 2.6.0 (#1962)
* Bump pylint from 2.5.3 to 2.6.0 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.5.3 to 2.6.0. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Changelog](https://github.com/PyCQA/pylint/blob/master/ChangeLog) - [Commits](https://github.com/PyCQA/pylint/compare/pylint-2.5.3...pylint-2.6.0) Signed-off-by: dependabot[bot] <support@github.com> * Address lint issues Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
@@ -48,8 +48,8 @@ def json_loads(data: Any) -> Dict[str, Any]:
|
||||
return {}
|
||||
try:
|
||||
return json.loads(data)
|
||||
except json.JSONDecodeError:
|
||||
raise APIError("Invalid json")
|
||||
except json.JSONDecodeError as err:
|
||||
raise APIError("Invalid json") from err
|
||||
|
||||
|
||||
def api_process(method):
|
||||
@@ -120,7 +120,7 @@ async def api_validate(
|
||||
try:
|
||||
data_validated = schema(data)
|
||||
except vol.Invalid as ex:
|
||||
raise APIError(humanize_error(data, ex))
|
||||
raise APIError(humanize_error(data, ex)) from None
|
||||
|
||||
if not origin:
|
||||
return data_validated
|
||||
|
||||
Reference in New Issue
Block a user