[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 14/19] qapi/expr.py: Remove single-letter variable
From: |
John Snow |
Subject: |
[PATCH v4 14/19] qapi/expr.py: Remove single-letter variable |
Date: |
Thu, 25 Mar 2021 02:03:51 -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 5921fa34ab..1869ddf815 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -233,14 +233,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 feat 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_lower(f['name'], info, source)
- check_if(f, info, source)
+ assert isinstance(feat, dict)
+ check_keys(feat, info, source, ['name'], ['if'])
+ check_name_is_str(feat['name'], info, source)
+ source = "%s '%s'" % (source, feat['name'])
+ check_name_str(feat['name'], info, source)
+ check_if(feat, info, source)
def check_enum(expr: _JSONObject, info: QAPISourceInfo) -> None:
--
2.30.2
- Re: [PATCH v4 10/19] qapi/expr.py: Add casts in a few select cases, (continued)
- [PATCH v4 12/19] qapi/expr.py: add type hint annotations, John Snow, 2021/03/25
- [PATCH v4 13/19] qapi/expr.py: Consolidate check_if_str calls in check_if, John Snow, 2021/03/25
- [PATCH v4 15/19] qapi/expr.py: enable pylint checks, John Snow, 2021/03/25
- [PATCH v4 17/19] qapi/expr.py: Use tuples instead of lists for static data, John Snow, 2021/03/25
- [PATCH v4 16/19] qapi/expr.py: Add docstrings, John Snow, 2021/03/25
- [PATCH v4 18/19] qapi/expr.py: move related checks inside check_xxx functions, John Snow, 2021/03/25
- [PATCH v4 14/19] qapi/expr.py: Remove single-letter variable,
John Snow <=
- [PATCH v4 11/19] qapi/expr.py: Modify check_keys to accept any Collection, John Snow, 2021/03/25
- [PATCH v4 19/19] qapi/expr.py: Use an expression checker dispatch table, John Snow, 2021/03/25
- Re: [PATCH v4 00/19] qapi: static typing conversion, pt3, Markus Armbruster, 2021/03/25
- Re: [PATCH v4 00/19] qapi: static typing conversion, pt3, John Snow, 2021/03/25
- Re: [PATCH v4 00/19] qapi: static typing conversion, pt3, John Snow, 2021/03/26