diff options
author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2012-08-29 09:47:19 +0200 |
---|---|---|
committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2012-08-29 09:47:19 +0200 |
commit | d50dbe1de83727ce7280c3d84e01e091e292a233 (patch) | |
tree | 5ad1e005c692dfb9dcd51dc29029becc497b8698 | |
parent | 1b9339ffd570ece77a2299aee544124d5db855cc (diff) | |
download | astroid-d50dbe1de83727ce7280c3d84e01e091e292a233.tar.gz |
properly define file_encoding Module attribute. Closes #104041
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | scoped_nodes.py | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -3,6 +3,7 @@ Change log for the astng package -- * #92362: fix pyreverse crash on relative import + * #104041: fix crash 'module object has no file_encoding attribute' 2012-07-18 -- 0.24.0 * include pylint brain extension, describing some stuff not properly understood until then. diff --git a/scoped_nodes.py b/scoped_nodes.py index 1a1242c..4be1a97 100644 --- a/scoped_nodes.py +++ b/scoped_nodes.py @@ -220,6 +220,9 @@ class Module(LocalsDictNodeNG): # the file from which as been extracted the astng representation. It may # be None if the representation has been built from a built-in module file = None + # encoding of python source file, so we can get unicode out of it (python2 + # only) + file_encoding = None # the module name name = None # boolean for astng built from source (i.e. ast) |