Rename "input" to avoid redefining built-in
We formerly used a variable named "input". This is legal in Python, but potentially confusing since there's a built-in named "input" that this shadows in that scope. Rename the variable, to avoid that confusion. This fixes the following pylint warning: W:1440, 8: Redefining built-in 'input' (redefined-builtin) Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
This commit is contained in:
parent
ad0d06cced
commit
62c1db1141
|
@ -1437,7 +1437,7 @@ def process_c_file(f, patch_infos):
|
||||||
return
|
return
|
||||||
|
|
||||||
if f == "-":
|
if f == "-":
|
||||||
input = sys.stdin
|
my_input = sys.stdin
|
||||||
else:
|
else:
|
||||||
# Symlinks should never get here, but just in case...
|
# Symlinks should never get here, but just in case...
|
||||||
if (not allowlink) and os.path.islink(f):
|
if (not allowlink) and os.path.islink(f):
|
||||||
|
@ -1445,7 +1445,7 @@ def process_c_file(f, patch_infos):
|
||||||
num_links_skipped = num_links_skipped + 1
|
num_links_skipped = num_links_skipped + 1
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
input = open(f, "r")
|
my_input = open(f, "r")
|
||||||
except BaseException:
|
except BaseException:
|
||||||
print("Error: failed to open", h(f))
|
print("Error: failed to open", h(f))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -1465,7 +1465,7 @@ def process_c_file(f, patch_infos):
|
||||||
print("Examining", f)
|
print("Examining", f)
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
text = "".join(input.readlines())
|
text = "".join(my_input.readlines())
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
while i < len(text):
|
while i < len(text):
|
||||||
|
|
Loading…
Reference in New Issue