[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 10/16] qapi/expr.py: Remove single-letter variable
From: |
John Snow |
Subject: |
[PATCH v3 10/16] qapi/expr.py: Remove single-letter variable |
Date: |
Mon, 22 Feb 2021 19:34:02 -0500 |
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
---
scripts/qapi/expr.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index 3235a3b809e..473ee4f7f7e 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -214,14 +214,14 @@ def check_features(features: Optional[object],
raise QAPISemError(info, "'features' must be an array")
features[:] = [f if isinstance(f, dict) else {'name': f}
for f in features]
- for f in features:
+ for feature in features:
source = "'features' member"
- assert isinstance(f, dict)
- check_keys(f, info, source, ['name'], ['if'])
- check_name_is_str(f['name'], info, source)
- source = "%s '%s'" % (source, f['name'])
- check_name_str(f['name'], info, source)
- check_if(f, info, source)
+ assert isinstance(feature, dict)
+ check_keys(feature, info, source, ['name'], ['if'])
+ check_name_is_str(feature['name'], info, source)
+ source = "%s '%s'" % (source, feature['name'])
+ check_name_str(feature['name'], info, source)
+ check_if(feature, info, source)
def check_enum(expr: Expression, info: QAPISourceInfo) -> None:
--
2.29.2
- Re: [PATCH v3 06/16] qapi/expr.py: Check type of 'data' member, (continued)
[PATCH v3 07/16] qapi/expr.py: Add casts in a few select cases, John Snow, 2021/02/22
[PATCH v3 09/16] qapi/expr.py: Consolidate check_if_str calls in check_if, John Snow, 2021/02/22
[PATCH v3 10/16] qapi/expr.py: Remove single-letter variable,
John Snow <=
[PATCH v3 11/16] qapi/expr.py: enable pylint checks, John Snow, 2021/02/22
[PATCH v3 12/16] qapi/expr.py: Add docstrings, John Snow, 2021/02/22
[PATCH v3 08/16] qapi/expr.py: add type hint annotations, John Snow, 2021/02/22
Re: [PATCH v3 08/16] qapi/expr.py: add type hint annotations, Markus Armbruster, 2021/02/25