cubicweb #1382559 [pylint] supress most errors [waiting feedback]
There are an awfull lot of spurious errors/warnings signaled by pylint on cw. Most of them should be shut down. The current situation impairs proper pylint use on cw/cubes (in conjunction with emacs/flymake for instance). | |
priority | important |
---|---|
type | enhancement |
done in | <not specified> |
load | 3.000 |
load left | 3.000 |
closed by | <not specified> |
similar entity
Comments
-
2010/12/14 10:40
-
2010/12/14 10:50, written by acampeas
- selectors
- self._cw
- self.eidto/eidfrom/rtype/entity in hooks
- log methods
-
2010/12/14 11:12
-
2011/09/27 08:34, written by acampeas
-
2011/09/27 09:03, written by acampeas
-
2011/10/28 09:24, written by sthenault
-
2013/03/28 15:06, written by pydavid
add commentDo you mean on CW core or on cubes?
I would really like a pylint plugin for cubes. The main idea would be to use the information in the yams schema to know which attributes are available on an Entity, and knowing a few things about selectors so that for instance a plain __select__ = is_instance('Frobble') means that entity will be of the given type. Bonus point for using information about the cardinalities in the schema and warn about self.some_relation[0] used on 1 to many relations.
I was thinking about, e.g.:
There are certainly a bunch of other offenders.
But I also agree with you suggestion (that may be more broad in scope and less trivial to implement).
a broad scope can easily be split in manageable chunks :-)
the first one comes from objectify_selector usage and appears to be tricky to fix 'as is'
see cubicweb/pylintext.py
This ticket is "in progress" but there is no associated patch. Moving to "waiting for feedback"