From 5ad0ebf23b40f1fdfdd2c1630a92223518c0537c Mon Sep 17 00:00:00 2001 From: Spencer Young Date: Fri, 3 Apr 2020 22:11:13 -0700 Subject: [PATCH] dont shadow builtin names --- yamllint/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yamllint/cli.py b/yamllint/cli.py index e413020..0d36d75 100644 --- a/yamllint/cli.py +++ b/yamllint/cli.py @@ -41,8 +41,8 @@ def yamlopen(fp, **iowrapper_kwargs): raw_data = raw_file.read() encoding = chardet.detect(raw_data).get('encoding') or 'utf-8' iowrapper_kwargs['encoding'] = encoding - buffer = io.BytesIO(raw_data) - with io.TextIOWrapper(buffer, **iowrapper_kwargs) as decoded: + buff = io.BytesIO(raw_data) + with io.TextIOWrapper(buff, **iowrapper_kwargs) as decoded: yield decoded