From 1f21fadf55d1be28a56a8c6fca8bdd1dda310311 Mon Sep 17 00:00:00 2001 From: David Halter Date: Sun, 2 Sep 2012 14:48:27 +0200 Subject: [PATCH] class decorators are just being ignored, until I know of a use case, where Jedi returns the wrong results --- README.mdown | 3 ++- evaluate.py | 1 - test/completion/decorators.py | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.mdown b/README.mdown index 6416789e..f4a08f15 100644 --- a/README.mdown +++ b/README.mdown @@ -48,11 +48,12 @@ Jedi supports many of the widely used Python features: - (nested) list comprehensions / ternary expressions - function annotations (py3k feature, are ignored right now, but being parsed. I don't know what to do with them.) + - class decorators (py3k feature, are being ignored too, until I find a use + case, that doesn't work with Jedi) However, it does not yet support (and probably will in future versions, because they are on my todo list): - - class decorators (py3k feature) - getattr() / __getattr__ / __getattribute__ - sys.path modifications - manipulations of instances outside the instance variables, without using diff --git a/evaluate.py b/evaluate.py index 4875e60b..80bc265a 100644 --- a/evaluate.py +++ b/evaluate.py @@ -12,7 +12,6 @@ TODO magic methods: __mul__, __add__, etc. TODO evaluate asserts/isinstance (type safety) python 3 stuff: -TODO class decorators TODO nonlocal statement, needed or can be ignored? TODO __ instance attributes should not be visible outside of the class. diff --git a/test/completion/decorators.py b/test/completion/decorators.py index 554ff0b0..3206092d 100644 --- a/test/completion/decorators.py +++ b/test/completion/decorators.py @@ -141,3 +141,12 @@ def follow_statement(stmt): # here we had problems with the else clause, because the parent was not right. #? int() follow_statement(1) + +# ----------------- +# class decorators +# ----------------- + +# class decorators should just be ignored +@should_ignore +class A(): pass +