From 17bd27efb2e0214a2358f788a68d44786dc5cfe3 Mon Sep 17 00:00:00 2001 From: Matej Matuska Date: Thu, 10 Aug 2023 11:41:34 +0200 Subject: [PATCH] Satisfy new linter warnings Linter started giving new warnings on Python 3.9, let's make it happy again. --- leapp/models/fields/__init__.py | 2 +- tests/scripts/test_utils_project.py | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/leapp/models/fields/__init__.py b/leapp/models/fields/__init__.py index 622b9eee7..5e24be44d 100644 --- a/leapp/models/fields/__init__.py +++ b/leapp/models/fields/__init__.py @@ -46,7 +46,7 @@ def __init__(self, default=None, help=None): # noqa; pylint: disable=redefined- self._nullable = False self._default = default - if type(self) == Field: + if type(self) is Field: raise ModelMisuseError("Do not use this type directly.") def _validate_model_value(self, value, name): diff --git a/tests/scripts/test_utils_project.py b/tests/scripts/test_utils_project.py index df8d2e85d..c58a8a6b4 100644 --- a/tests/scripts/test_utils_project.py +++ b/tests/scripts/test_utils_project.py @@ -4,8 +4,15 @@ from helpers import TESTING_REPOSITORY_NAME from leapp.exceptions import CommandError -from leapp.utils.repository import requires_repository, to_snake_case, make_class_name, make_name,\ - find_repository_basedir, get_repository_name, get_repository_metadata +from leapp.utils.repository import ( + requires_repository, + to_snake_case, + make_class_name, + make_name, + find_repository_basedir, + get_repository_name, + get_repository_metadata, +) def setup_module():