diff mbox series

[06/15] python: Add 'fh' to known-good variable names

Message ID 20201021185208.1611145-7-jsnow@redhat.com
State Accepted
Commit d229f1c83d698ed5f605bcc2eab96e05afeddefb
Headers show
Series python: absorb scripts/qmp/qom-* tooling | expand

Commit Message

John Snow Oct. 21, 2020, 6:51 p.m. UTC
fd and fh are fine: we often use these for "file descriptor" or "file
handle" accordingly. It is rarely the case that you need to enforce a
more semantically meaningful name beyond "This is the file we are using
right now."

While we're here: add comments for all of the non-standard pylint
names. (And the underscore.)

Signed-off-by: John Snow <jsnow@redhat.com>
---
 python/setup.cfg | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/python/setup.cfg b/python/setup.cfg
index 506944ef6b..58cf48aaed 100755
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -56,9 +56,10 @@  good-names=i,
            k,
            ex,
            Run,
-           _,
-           fd,
-           c,
+           _,   # By convention: Unused variable
+           fh,  # fh = open(...)
+           fd,  # fd = os.open(...)
+           c,   # for c in string: ...
 
 [pylint.similarities]
 # Ignore imports when computing similarities.