Skip to content

Commit be40ae1

Browse files
committed
rename var
1 parent 89cd883 commit be40ae1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/shutil.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def copyfile(src, dst, *, follow_symlinks=True):
218218
if _samefile(src, dst):
219219
raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
220220

221-
filesize = 0
221+
file_size = 0
222222
for i, fn in enumerate([src, dst]):
223223
try:
224224
st = os.stat(fn)
@@ -230,7 +230,7 @@ def copyfile(src, dst, *, follow_symlinks=True):
230230
if stat.S_ISFIFO(st.st_mode):
231231
raise SpecialFileError("`%s` is a named pipe" % fn)
232232
if _WINDOWS and i == 0:
233-
filesize = st.st_size
233+
file_size = st.st_size
234234

235235
if not follow_symlinks and os.path.islink(src):
236236
os.symlink(os.readlink(src), dst)
@@ -254,7 +254,7 @@ def copyfile(src, dst, *, follow_symlinks=True):
254254
# considerable speedup by using a readinto()/memoryview()
255255
# variant of copyfileobj(), see:
256256
# https://github.com/python/cpython/pull/7160#discussion_r195162475
257-
elif _WINDOWS and filesize >= 128 * 1024 * 1024:
257+
elif _WINDOWS and file_size >= 128 * 1024 * 1024:
258258
_copybinfileobj(fsrc, fdst)
259259
return dst
260260

0 commit comments

Comments
 (0)