]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
python-common/deployment: rename a single letter variable
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 1 Nov 2024 17:45:25 +0000 (13:45 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Mon, 4 Nov 2024 20:38:43 +0000 (15:38 -0500)
Rename a single letter variable name that was flagged by flake8. The
unique name `lbl` was chosen as it was short and didn't conflict with
any existing uses of the variable `label` in this file.

Part of an effort to get ceph tox environments passing on Python 3.12.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/python-common/ceph/deployment/service_spec.py

index 979c14f7d00fd07299f94b1adc3abcec126b45c7..b1a8b8eda3627d17293b6f39800a38b0aa8fe202 100644 (file)
@@ -527,8 +527,8 @@ pattern_type=PatternType.fnmatch))
         labels = [x for x in strings if 'label:' in x]
         if len(labels) > 1:
             raise SpecValidationError('more than one label provided: {}'.format(labels))
-        for l in labels:
-            strings.remove(l)
+        for lbl in labels:
+            strings.remove(lbl)
         label = labels[0][6:] if labels else None
 
         host_patterns = strings