From aa64316f4785abff2f7b48f65b0775d33c0846e8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 15:38:26 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- nailgun/entity_mixins.py | 2 +- tests/test_client.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/nailgun/entity_mixins.py b/nailgun/entity_mixins.py index 60b630a3..d7a56c26 100644 --- a/nailgun/entity_mixins.py +++ b/nailgun/entity_mixins.py @@ -1456,7 +1456,7 @@ def to_json_serializable(obj): if isinstance(obj, dict): return {k: to_json_serializable(v) for k, v in obj.items()} - elif isinstance(obj, (list, tuple)): + elif isinstance(obj, list | tuple): return [to_json_serializable(v) for v in obj] elif isinstance(obj, datetime): return obj.strftime('%Y-%m-%d %H:%M:%S') diff --git a/tests/test_client.py b/tests/test_client.py index d5557afc..0de36914 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,10 +1,9 @@ """Unit tests for :mod:`nailgun.client`.""" import inspect -from unittest import mock -from unittest import TestCase +from unittest import TestCase, mock -import requests from fauxfactory import gen_alpha +import requests from nailgun import client