[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/16] qapi/expr.py: Remove single-letter variable
From: |
John Snow |
Subject: |
[PATCH 10/16] qapi/expr.py: Remove single-letter variable |
Date: |
Tue, 22 Sep 2020 17:13:07 -0400 |
Signed-off-by: John Snow <jsnow@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 5d5c3d050d..f244e9648c 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -211,14 +211,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.26.2
- Re: [PATCH 06/16] qapi/expr.py: Check type of 'data' member, (continued)
- [PATCH 07/16] qapi/expr.py: Add casts in a few select cases, John Snow, 2020/09/22
- [PATCH 08/16] qapi/expr.py: add type hint annotations, John Snow, 2020/09/22
- [PATCH 09/16] qapi/expr.py: rewrite check_if, John Snow, 2020/09/22
- [PATCH 10/16] qapi/expr.py: Remove single-letter variable,
John Snow <=
- [PATCH 11/16] qapi/expr.py: enable pylint checks, John Snow, 2020/09/22
- [PATCH 12/16] qapi/expr.py: Add docstrings, John Snow, 2020/09/22