Skip to content

Commit

Permalink
WIP - consider with
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Apr 23, 2021
1 parent f69339c commit af4fffc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions astroid/scoped_nodes.py
Expand Up @@ -514,6 +514,21 @@ def stream(self):
"""
return self._get_stream()

# def __enter__(self) -> Optional[]:
# """Get a stream to the underlying file or bytes.
#
# :type: file or io.BytesIO or None
# """
# if self.file_bytes is not None:
# return io.BytesIO(self.file_bytes)
# if self.file is not None:
# self.file_stream = open(self.file, "rb")
# return self.file_stream
# return None
#
# def __exit__(self, type, value, traceback):
# self.file_stream.close()

def block_range(self, lineno):
"""Get a range from where this node starts to where this node ends.
Expand Down

0 comments on commit af4fffc

Please sign in to comment.