diff options
| author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2006-05-05 14:22:00 +0000 |
|---|---|---|
| committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2006-05-05 14:22:00 +0000 |
| commit | dade2eac4a3b4b984529e85e1e1d2459c453574e (patch) | |
| tree | a4fe48902b2df75e80ed8d398ad20a3bfe864f7b /nodes.py | |
| parent | 85529cfcb8e870333d7292cb493f54d7f3fd92cf (diff) | |
| download | astroid-git-dade2eac4a3b4b984529e85e1e1d2459c453574e.tar.gz | |
* fix Class.block_range method (this fix pylint's inline disabling of
* fix Class.block_range method (this fix pylint's inline disabling of
messages on classes)
Diffstat (limited to 'nodes.py')
| -rw-r--r-- | nodes.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -237,12 +237,15 @@ extend_class(Node, NodeNG) # block range overrides ####################################################### -def function_block_range(node, lineno): - """handle block line numbers range for function statements +def object_block_range(node, lineno): + """handle block line numbers range for function/class statements: + + start from the "def" or "class" position whatever the given lineno """ return node.source_line(), node.last_source_line() -Function.block_range = function_block_range +Function.block_range = object_block_range +Class.block_range = object_block_range def if_block_range(node, lineno): """handle block line numbers range for if/elif statements |
