From 056b818d8b9e59e26e3c7d8344c88523f94a1980 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Wed, 12 Jun 2024 09:56:29 -0400 Subject: [PATCH] pylint: Skip two E1130 errors The pylint job is currently failing with these errors -- get it passing again. I assume this occurs because pylint doesn't really understand sqlalchemy's or_() method, and therefore can't properly determine the return types from condition_db_filter() or or_(). Change-Id: I636770ec30cddcb5b7c9692ff0b2afdc7971d80d --- cinder/db/sqlalchemy/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/db/sqlalchemy/api.py b/cinder/db/sqlalchemy/api.py index 102976b4fee..0fe7596ba0f 100644 --- a/cinder/db/sqlalchemy/api.py +++ b/cinder/db/sqlalchemy/api.py @@ -406,7 +406,7 @@ def condition_not_db_filter(model, field, value, auto_none=True): If auto_none is True then we'll consider NULL values as different as well, like we do in Python and not like SQL does. """ - result = ~condition_db_filter(model, field, value) + result = ~condition_db_filter(model, field, value) # pylint: disable=E1130 if auto_none and ( ( @@ -789,7 +789,7 @@ def _clustered_bool_field_filter(query, field_name, filter_value): ), ) if not filter_value: - query_filter = ~query_filter + query_filter = ~query_filter # pylint: disable=E1130 query = query.filter(query_filter) return query