summaryrefslogtreecommitdiff
path: root/astroid/builder.py
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-04-24 10:03:34 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-04-24 10:03:34 +0200
commit5a6e387443b2d9463cf42019d141b6105bcde7a9 (patch)
treeb1641fab500a4755f99412655d2fccb784f4e97f /astroid/builder.py
parentf653d47961629af715de253827862c406b7cb0a8 (diff)
downloadastroid-git-fix-pylint-warning-from-master-branch.tar.gz
Disable consider-using-with in function returning a streamfix-pylint-warning-from-master-branch
Diffstat (limited to 'astroid/builder.py')
-rw-r--r--astroid/builder.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/astroid/builder.py b/astroid/builder.py
index 789c2c0a..de5acac1 100644
--- a/astroid/builder.py
+++ b/astroid/builder.py
@@ -50,6 +50,7 @@ MANAGER = manager.AstroidManager()
def open_source_file(filename):
+ # pylint: disable=consider-using-with
with open(filename, "rb") as byte_stream:
encoding = detect_encoding(byte_stream.readline)[0]
stream = open(filename, newline=None, encoding=encoding)