summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--astroid/builder.py1
-rw-r--r--astroid/scoped_nodes.py1
-rw-r--r--pylintrc6
3 files changed, 7 insertions, 1 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)
diff --git a/astroid/scoped_nodes.py b/astroid/scoped_nodes.py
index 9dff37a8..801b55ee 100644
--- a/astroid/scoped_nodes.py
+++ b/astroid/scoped_nodes.py
@@ -503,6 +503,7 @@ class Module(LocalsDictNodeNG):
if self.file_bytes is not None:
return io.BytesIO(self.file_bytes)
if self.file is not None:
+ # pylint: disable=consider-using-with
stream = open(self.file, "rb")
return stream
return None
diff --git a/pylintrc b/pylintrc
index 1216883f..3dbbc5ae 100644
--- a/pylintrc
+++ b/pylintrc
@@ -110,7 +110,11 @@ disable=fixme,
format,
# temporary until we fix the problems with InferenceContexts
no-member,
- # everything here is legacy not checked in astroid/brain
+ # We might want to disable new checkers from master that do not exists
+ # in latest published pylint
+ bad-option-value,
+ # Legacy warning not checked in astroid/brain before we
+ # transitioned to setuptools and added an init.py
duplicate-code,
enable=useless-suppression