I'm working on a new class checker which complains about attributes
which are defined but not used within the class. This check triggers
all sorts of warnings throughout the test suite. What do I do? Lots
of expected output will have to be changed.
These features may already be possible with some tools. If so,
When a class evolves over a long period of time, it's quite possible
for methods or data attributes to fall into disuse. While I realize
that attributes which don't start with an underscore are implicitly
part of the class's API, most attributes are used internally. I'd
like to be able to have my checker(s) warn me if I define an attribute
but don't use it within the class:
self.x = 0
If I never refer to self.x or self.y within the class's methods it
would be nice to be alerted. It might catch misspellings
(think_long_amd_meaningful_attribute_names) or catch what is
effectively dead code. Obviously, this checker should be something
you can turn on and off selectively. There are plenty of cases where
attributes aren't used within the class implementation but are used by
its clients. This is not a hard-and-fast rule.
Here's the other problem I'd like to catch:
foo = property(get_foo)
The problem here is that I have violated this Zen of Python dictum:
There should be one-- and preferably only one --obvious way to do it.
I will admit that I sometimes go back and forth on property objects.
On the one hand, as a Python programmer, I like them. I didn't always
feel that way though, and some of the people I have worked with over
the years have been more C++-centric, and tended to spell their
setters and getters without leading underscores.
I came from http://docs.pylint.org/contribute.html#mailing-lists
Im the author of some code-quality libraries such as https://github.com/klen/pylama. I use that in my VIM plugin
https://github.com/klen/python-mode. Pylama is simular to flake8, but have some additional features and works also with pylint.
Today I would like to make code checking with pylama is more asynchronously. I haven't any problems with pyflake, pep8, pep257 and mccabe but cannot make pylint works. When I run pylint with a few threads I get errors like this: https://gist.github.com/klen/5721176. When one thread try to run pylint a more from one time I got this error.
I think the problem in ASTNG MANAGER and I try to clean that cache.
I tried to clear the cache in several ways https://gist.github.com/klen/5721225 but not have success.
Can anybody help me?
PS: Sorry for my English, its far from well I now.
horneds(a)gmail.com | http://klen.github.io
mobile: +7 906 7723620
Jaíba AMANDA FARIAS TELES, LEONARDO LICARIAO DE MELLO MENEZES, FRANCISCO AGEU DE SOUSA NOBREGA, PAMELA NOBREGA MENEZES, JOÃO CARLOS MOREIRA DE CARVALHO, CLYCIA MONTEIRO FERREIRA, MARIA DE LOURDES FERREIRA BRITO, IZALANA PEREIRA NEPOMUCENO. SARA MARIA BEZERRA DOS SANTOS, ERALDO FREITA DA SILVA, MAYKSON CALISTA DE MELO, JOZENILDA BATISTA GOMES, WELIDA WENDY ARAUJO DA SILVA. Pires do Rio.
Quiterianópolis ANA ANGELICA PEREIRA ALVES, LETICIA BAIRLE, FRANCISCO ANDERSON VALE DO NASCIMENTO, PAULO DE SIQUEIRA SILVA, JOÃO CARLOS MOREIRA DE CARVALHO, DAMIANA PEREIRA DE OLIVERIA, MARIA DO SOCORRO DE ALBURQUERQUE ARRUDA BARBOSA, JAIME CUSTODIO DA SILVA FILHO. SEBASTIANA MÁRCIA GOMES DE MELO, ÉRICA FRANCISCA BATISTA DE MELO, MAYRES RAQUEL DA SILVA PINHEIRO, JUCIMARA VICENTE DOS SANTOS, WEULLER TEIXEIRA DE MAGALHAES. Coxim.
Central de Minas ANA KARINE PAULINO DA SILVA, LUAN VICTOR VASCONCELOS NOBERTO, FRANCISCO MARKAN NOBRE DE SOUZA FILHO, PEDRO SIQUEIRA FONTENELE, JOÃO CARLOS MOREIRA DE CARVALHO, DANIEL MOREIRA ALVES DA SILVA, MARIA JOELMA BEZERRA DA SILVA, JESSICA DE PONTES GOMES. SINELANDIA MARIA DA SILVA, BRENA CARLA DE MELO CAMELO, LUCINEIDE MARIA DA SILVA, HAROLDO PEIXOTO DA JUSTA JUNIOR, RENATA ROCHA DE NEGREIROS. Coxim.