Re: [Python-projects] pylint 0.22.0 : alpha release of python3.x support

2010-12-05 Thread Emile Anclin
On Monday 06 December 2010 04:09:29 Arfrever Frehtes Taifersar Arahesis wrote: > 2010-11-16 11:53:47 Emile Anclin napisał(a): > > Python3 support > > --- > > > > However, the Python3.x support should be considered as an alpha > > release, since we

[Python-projects] pylint W0703 : catching Exception

2010-11-22 Thread Emile Anclin
ror, or we should not warn at all. And should we warn about catching BaseException? I think that catching BaseException must be intended, so to warn here seems strange to me. Any opinions on the subject ? -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifi

[Python-projects] pylint 0.22.0 : alpha release of python3.x support

2010-11-16 Thread Emile Anclin
gurable, customizable, and you can easily write a small plugin to add a personal feature. Pylint is shipped with Pyreverse which creates UML diagrams for python code. -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissanc

Re: [Python-projects] lint programmatically

2010-11-16 Thread Emile Anclin
ssical" way to do it; but maybe you could overwrite lint.Pylinter.get_astng to return logilab.astng.builder.ASTNGBuilder.string_build(script_created_by_user) But that's only half of the job; you will need to use the --init-hook option to activate the scriptglobals hope, that helps ;) -- E

Re: [Python-projects] E0611

2010-10-25 Thread Emile Anclin
process! it is best to use the latest mercurial version : pip install -U hg+http://www.logilab.org/hg/project/pylint (indeed some false E0611 has been fixed in unreleased pylint version but the fixes are available in published commits) -- Emile Anclin http://www.logilab.fr/ http://

Re: [Python-projects] Pylint from Mercurial requires newer version of astng?

2010-10-25 Thread Emile Anclin
uess that the distribution metadata should be > updated to depend on an updated astng? Thanks, the dependence is wrong; (I will fix it). In general, the last pylint version depends on the last astng version; now we have : $ pylint --version No config file found, using default configuration pylint

Re: [Python-projects] pylint: Two false positives (W0612 and E1101) with function attributes

2010-10-18 Thread Emile Anclin
.logilab.org/ticket/8847 and it's planned for the next release of pylint ... thx anyway :) -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances ___ Python-Projects maili

[Python-projects] Pylint 3k coming soon !

2010-10-14 Thread Emile Anclin
file %s: %s' % (data_file, ex), file=sys.stderr) (some tests from astng does not pass though ; I had no time to make further investigation on Pylint tests). Anyway, you can run the tests or see what you can do else ... -- Emile Anclin http://

Re: [Python-projects] [PATCH] logilab-astng: add support for Python 2.7 dict comprehensions and set comprehensions

2010-10-11 Thread Emile Anclin
On Saturday 09 October 2010 22:10:07 Daniel Harding wrote: > Emile Anclin wrote: > > On Friday 01 October 2010 20:15:32 Daniel Harding wrote: > >> Currently if pylint is run under Python 2.7 to check a file > >> containing dictionary comprehensions or set comprehens

Re: [Python-projects] [PATCH] pylint: add support for set and dict comprehensions

2010-10-07 Thread Emile Anclin
pylint/test/input/func_noerror_my_example.py I will integrate your patch :) -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances ___ Python-Projects mailing list Python-Projects

[Python-projects] progress on making Pylint py3k compatible

2010-10-06 Thread Emile Anclin
rue | ] Module() . 1a65450 body = [ Print() . 1a65490 dest = values = [ ] ] This will be usefull when a crash occures and we want to investigate the trees. So, I hope this will help you to dive into astng and the Pylint 3k port. I will upd

Re: [Python-projects] [PATCH] logilab-astng: add support for Python 2.7 dict comprehensions and set comprehensions

2010-10-04 Thread Emile Anclin
add support for these > constructs to astng. > fabulous, this is half the job of making astng py3k compatible! (or at least an important part) I will apply the patch right now > Cheers, > > Daniel Harding -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/

Re: [Python-projects] A design for inc-lint, an incremental pylint

2010-09-29 Thread Emile Anclin
On Tuesday 28 September 2010 23:49:27 Edward K. Ream wrote: > On Tue, Sep 28, 2010 at 3:46 AM, Emile Anclin wrote: > > Usually, pylint / astng will have to parse most of the Python > > Standard Library (which is around 20 Mb) on any bigger project (such > > as a fram

Re: [Python-projects] A design for inc-lint, an incremental pylint

2010-09-28 Thread Emile Anclin
tions based on 'du' and considering that the size of .pyc files are similar to the .py) Given that, I am afraid we will have ~ 400 Mb for the only astng dumbs. So that seems to be the wrong road... Edward K Ream, did you have other ideas in mind to handle the problem ? --

Re: [Python-projects] pylint test errors

2010-09-27 Thread Emile Anclin
; > Anyone able to help? > >    -Nikolaus I would expect the same problem as for astng since again the RP vs R problem is solved .. -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances

Re: [Python-projects] logilab-astng test errors

2010-09-27 Thread Emile Anclin
le, the test "test_binary_op_list_mul_none" has been introduced after 0.20.1 and is testing a crash fixed then ... also, we have __init__ in the test repository (which I have been told to be bad), so this might cause problems too -- Emile Anclin http://www.logilab.fr/ http://www.log

Re: [Python-projects] logilab-common-0.51.1 fails tests with Python 2.7

2010-09-20 Thread Emile Anclin
estMethodName >          else: We can just do : -self.__exc_info = self._exc_info +self.__exc_info = sys.exc_info since _exc_info is doing nothing else. -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de con

Re: [Python-projects] Pylint feature request

2010-09-20 Thread Emile Anclin
d this spring : http://www.logilab.org/ticket/4683 -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances ___ Python-Projects mailing list Python-Projects@lists.logilab.org http:

[Python-projects] Py3k Port Part I : logilab-common

2010-09-14 Thread Emile Anclin
bly continue our investigation with python3.2 and hence a more accurate unittest version, or try if we can use the python3.2 version of unittest. (Concerning lgc.table, I know that it is used in 'projman', but it is not needed for pylint) -- Emile Anclin http://www.logilab.fr/

Re: [Python-projects] Py3k port

2010-09-09 Thread Emile Anclin
On Thursday 09 September 2010 11:37:57 Sylvain Thénault wrote: > On 09 septembre 11:24, Emile Anclin wrote: > > I might be missing something, but as far as I can see, if we only > > care about pylint-3k, it seems to me easier to translate > > pytest to py3k than to make all

Re: [Python-projects] Py3k port

2010-09-09 Thread Emile Anclin
sity be more complex than what sa2to3 and perhaps some if's or conditional imports can handle" Conditional imports already take place in astng; the couple of classes and methods to write for astng are syntax independent and might be needed for 2.7; and there might be some other expect

Re: [Python-projects] Py3k port

2010-09-06 Thread Emile Anclin
stopper. Well, what I meant is that just running 2to3 on all modules will definitely not be possible. We will have to implement at least the convenient astng nodes with inference methods and the like. But maybe that's the main job after all (except that a lot of tests will have to be adapted

Re: [Python-projects] pyreverse: few dependencies that should be shown, are shown?

2010-09-02 Thread Emile Anclin
occurs if the module of dependencies is not reachable by the PYTHONPATH *and* not parsed by Pyreverse. I hope it solved the problem. -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances ___

Re: [Python-projects] pyreverse: few dependencies that should be shown, are shown?

2010-09-02 Thread Emile Anclin
pyreverse also recognizes class members like: class Hello: member = World() but that won't help in your case, I guess ... -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances ___

Re: [Python-projects] pylint: false positives E0611, E1101

2010-09-01 Thread Emile Anclin
: No name 'Whatever' in module 'mod' > E1101: 3: Module 'mod' has no 'Spam' member pylint is a static code checker, so mod.py will not be executed, hence no modification of sys.modules. But the --init-hook option (see pylint --long-help) might

Re: [Python-projects] Py3k port

2010-09-01 Thread Emile Anclin
c changes to do: we have different trees with new nodes, nodes that disappear... I don't know if it is possible to have only one version of astng + pylint code, but we could try it. I hope that my informations helped, and I hope I will work on astng :) -- Emile Anc

Re: [Python-projects] A design for inc-lint, an incremental pylint

2010-07-27 Thread Emile Anclin
if I understood everything...) Or, at least if we could just store the informations about unmodified modules, it would probably be a huge improvement, and I wonder if going below would result in another important improvement: the _ast-parsing of a single file is quite fast. thx anyway

Re: [Python-projects] disabling warning for one long line only (potential ppylint bug???)

2010-07-26 Thread Emile Anclin
mmy-variables-rgx=_|dummy|unused will match '_' ,'_hello', '_fsize', 'dummy_sth', 'unused_var', etc, but not 'not_used', another_dummy', 'mydummyunusedvar' etc. Maybe we should explain that in the pylintrc file more explicitly ... -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances ___ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects

Re: [Python-projects] disabling warning for one long line only (potential ppylint bug???)

2010-07-22 Thread Emile Anclin
> readable If it is only about not using "fsize", you can call it _fsize, and it will be considered as a dummy variable (everything starting with "_" or with "dummy"; this dummy variable regex can be configured...). -- Emile Anclin http://www.logilab.fr/

Re: [Python-projects] How make PyLint just ignore unused variables of for loops? e.g. "i" in "for i in range(10)" ?

2010-07-20 Thread Emile Anclin
not. imho, we should actually talk about dummy variables when we are *sure* they are not used; and hence we ask Pylint not to check them. And when they are not dummy, we want Pylint to check that they are actually used. "Explicit is better than implicit" -- Emile Anclin

Re: [Python-projects] TypeError: can't multiply sequence by non-int of type 'NoneType'

2010-06-14 Thread Emile Anclin
as not necessary. -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances ___ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listi

Re: [Python-projects] pyreverse doesn't get relations across multiple modules?

2010-06-11 Thread Emile Anclin
gt; https://www.logilab.net/elo/ticket/9542 > (I can't access it, I need some password) Well, this ticket is unfortunately still open, and the "real" link is : http://www.logilab.org/ticket/9542 > Sorry for this my (very) late answer. But it proves that you are s

Re: [Python-projects] Calling Pylint from within Python

2010-06-11 Thread Emile Anclin
ns). Do you have other needs ? -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances ___ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/ma

Re: [Python-projects] nice pylint short help message vs. pylint 'first impression'

2010-04-27 Thread Emile Anclin
e most of a/ to Error). But if you do, won't it break bw compability either ? -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances ___ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects

Re: [Python-projects] nice pylint short help message vs. pylint 'first impression'

2010-04-26 Thread Emile Anclin
he "Warning" category is getting quite big, maybe too big. But, indeed I am not sure, I just want a quick mode. For bw compatibiliy, would it be possible to say that "Doubtful" is considered as a Warning sub category, and D0105 and W0105 would both be ok? -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances ___ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects

[Python-projects] nice pylint short help message vs. pylint 'first impression'

2010-04-26 Thread Emile Anclin
sn't do anything* :W0710: *Exception doesn't inherit from standard "Exception" class* ? :W1001: *Use of "property" on an old style class* (I don't know if this is not more 'almost an error') :W9901: *Unused key %r in format string dictionary* -8&

Re: [Python-projects] Exception while running pylint

2010-04-15 Thread Emile Anclin
On Wednesday 14 April 2010 17:03:32 Roland Hedberg wrote: hi, thanks for your package. I could solve your crash on astng. > On Apr 14, 2010, at 14:22, Emile Anclin wrote: > > On Wednesday 14 April 2010 09:34:25 Roland Hedberg wrote: > >> Hi! > > > > Hi ! > &g

Re: [Python-projects] Exception while running pylint

2010-04-14 Thread Emile Anclin
list with it. Yes, if you send me the module, I will have a look at it. -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances ___ Python-Projects mailing list Python-Projec

Re: [Python-projects] Google Summer Of Code: porting pylint to py3k

2010-04-12 Thread Emile Anclin
not the problem, but we will have to parse new kind of nodes (Nonlocal, Dict/SetGenerator, Starred (at least for extended literal unpacking), SetComp etc. hence a lot of new 'visit_%' methods in astng and pylint), deal with 'print' as a function, and all the

Re: [Python-projects] [logilab-astng] New ticket #22973: pylint crashes due to astng problem with child_sequence

2010-04-07 Thread Emile Anclin
ment and Comparing two objects ... It would help ma a lot to find out how this Delete node happens to be searched in Compare node's children ? I can't otherwise imagine how I should find the mistake.. -- Emile Anclin http://www.logilab.fr/ http://ww

Re: [Python-projects] Patch for fedora bz500272 - pylint throws an exception when called with the --disable-msg-cat command line option

2010-04-07 Thread Emile Anclin
catid = catid.upper() > +catid = catid[0].upper() > if not catid in MSG_TYPES: > raise Exception('Unknown category identifier %s' % > catid) yield catid I think we will have to fix it a bit differently... But thank

Re: [Python-projects] Stacktrace from pylint 0.19

2010-04-01 Thread Emile Anclin
the following code Current version is 0.20.0, and ... > > x = "" > x += "foo" > print x.strip() [skip traceback] >impl = BIN_OP_IMPL[operator] > KeyError: '+=' this problem was fixed. Thanks anyway! -- Emile Anclin http://www.logilab.fr/

Re: [Python-projects] #4683: Non-ASCII characters count double if utf8 encode

2010-03-30 Thread Emile Anclin
On Tuesday 30 March 2010 13:45:42 Sylvain Thénault wrote: > On 30 mars 14:35, Alexander Artemenko wrote: > > Hi, > > > > On Tue, Mar 30, 2010 at 1:20 PM, Emile Anclin wrote: > > > +                decode = stream.readline().decode > > > +                l

Re: [Python-projects] #4683: Non-ASCII characters count double if utf8 encode

2010-03-30 Thread Emile Anclin
r = lambda: decode(encoding) instead of: + line_generator = lambda: stream.readline().decode(encoding) Can somebody explain me what happened ? Anyhow, Appended my new patch (we use func_noerror_* if we don't want the message triggered) Is that ok ? -- Emile Anc

Re: [Python-projects] pylint #4581 proposed fix

2010-03-29 Thread Emile Anclin
ing method3 -def method2(self): -.method2(self) +# inherited from containing method2 +if __revision__: +def method2(self): +.method2(self) +else: +def method2(self): + AAAA.method1(self) -- Emile Anclin http://www.logilab.

Re: [Python-projects] Patch to close #4595

2010-03-29 Thread Emile Anclin
On Sunday 28 March 2010 08:57:44 Sarah Strong wrote: > Hey, > > I've attached a patch to fix ticket #4595. It's a trivial change, but > please let me know whether the patch is up to standard. > > Thanks very much! > -Sarah Strong Thank you! I had nothing to cha

Re: [Python-projects] [Debian] logilab-astng: What description to use?

2010-03-29 Thread Emile Anclin
rds, Well, yes, you got it right of course: the __pkginfo__.py is more updated than the README. I did a lot of information update everywhere arount pylint and astng, but forgot the README. I will update the README right now. -- Emile Anclin http://www.logilab.fr/ http://www.logilab.o

Re: [Python-projects] pylint #4581 proposed fix

2010-03-24 Thread Emile Anclin
id trailing white spaces - no error tests are usually called func_noerror* and have no corresponding error message file (example attached) -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances diff -r b0aab39f8

[Python-projects] astng 0.20.0 and pylint 0.20.0 releases

2010-03-23 Thread Emile Anclin
all people who found new bugs, added interesting tickets and helped with their suggestions to improve pylint and keep the project alive. -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances _

Re: [Python-projects] pylint #4581 proposed fix

2010-03-22 Thread Emile Anclin
it with the mercurial extention mqueue, or with $ hg patch (--no-comit) something.diff -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de connaissances ___ Python-Projects mailing list Python-

Re: [Python-projects] Proposed output improvements

2010-03-18 Thread Emile Anclin
:W0702: *No exception type(s) specified* :W0704: *Except doesn't do anything* etc 4/ W0511 : Used when a warning note as FIXME or XXX is detected. there was this proposal from Maarten ter Huurne (right?) to create a knew message category for that 5/ ?? I think, 1 and 2 should be inc

Re: [Python-projects] Output improvements

2010-03-17 Thread Emile Anclin
would immediately be visible in the help message, and user would quite fast use them without forgetting refactor or convention issues. The really important thing for me is a synthetic help message with one letter options for important things. (btw --cache-size was disabled anyway ;) it will be remov

Re: [Python-projects] pylint #18860: warn on assert( a, b ?) patch

2010-03-17 Thread Emile Anclin
>>> isinstance(inst, nodes.Tuple) False > Without those checks, we can't really be sure that the assertion will > always be true, so the warning message would have to be a bit more > noncommittal. Maybe something like: > > "Found assertion of tuple. Did you mean

Re: [Python-projects] and there was a thread and a ticket about it ....

2010-03-16 Thread Emile Anclin
On Tuesday 16 March 2010 11:19:17 Emile Anclin wrote: > I came across your problem a long time ago; and there was a thread and a ticket about it http://lists.logilab.org/pipermail/python-projects/2009-June/001945.html https://www.logilab.net/elo/ticket/9542 Of course, that doesn't

Re: [Python-projects] pyreverse doesn't get relations across multiple modules?

2010-03-16 Thread Emile Anclin
; Also you should probably use absolute import > > anyway, pylint should have told you relative import are bad ;) > Relative import does not seem to be the problem: when I go to pylint/test and do $ pylint data I get no 'relative import' complain. However, Pyreverse still do

Re: [Python-projects] pylint #18860: warn on assert( a, b ?)

2010-02-18 Thread Emile Anclin
On Thursday 18 February 2010 11:42:38 Sylvain Thénault wrote: > On 18 février 11:40, Emile Anclin wrote: > > On Thursday 18 February 2010 11:21:55 Sylvain Thénault wrote: > > > > I guess, you should actually add a *visit_assert* and check the > > > > type of

Re: [Python-projects] pylint #18860: warn on assert( a, b ?)

2010-02-18 Thread Emile Anclin
tuple goes into assert_node.test, the 'bad' into assert_node.fail; here is the tree: Module() body = [ Assert() test = Tuple(tuple) elts = [ Name(a) Name(b) ] fail = Name(bad_msg) ] -- Emi

[Python-projects] links to the tickets for pyreverse crash

2010-02-18 Thread Emile Anclin
tng #20759: crash on pyreverse UNARY_OP_METHOD KeyError '~' There is a lot to do about Pyreverse, since it has been brought back to life one and a half year ago, and than left alone :/ However I hope I will soon find the time to fix them, since I am working on astng. Emile Anclin -- Emile

Re: [Python-projects] pyreverse raises “KeyError : '~'”

2010-02-18 Thread Emile Anclin
ce can > be found at the end of this e-mail. thank you for your two bug reports: both could be reproduced. They are astng bugs and will be filled right now. -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique &a

Re: [Python-projects] pylint #18860: warn on assert( a, b ?)

2010-02-18 Thread Emile Anclin
e type of 'test' : def visit_assert(self, node): if isinstance(node.test, astng.Tuple): that_s_bad() Maybe we want it in checkers/exceptions.py ? -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/ Informatique scientifique & et gestion de co

Re: [Python-projects] Heads up: a friendly fork of pylint?

2010-02-16 Thread Emile Anclin
be quite wrong about that. Also, I am very interested about your ideas: Pass 4: post-process pylint nodes and : Pass 5: dynamic analysis This is the fun/hard part. We want to infer the types that variables can have, and the types that functions (and classes with __call__ members) can have.

Re: [Python-projects] Pylint Bug Report

2010-01-27 Thread Emile Anclin
now about that, but : [skip] > Old version: > install_requires = ['logilab-common', 'logilab-astng >= 0.19.2'] > > New version: > install_requires = ['logilab-common >= 0.46.0', 'logilab-astng >= > 0.19.2'] Thank you, it will be

Re: [Python-projects] logilab-astng-0.19.3/nodes_as_string.py

2010-01-13 Thread Emile Anclin
the code, concerning visit_unaryop : def visit_unaryop(self, node): """return an astng.UnaryOp node as string""" -return '%s%s' % (node.op, node.operand.accept(self)) + # parenthesis: at least to protect 'not'

Re: [Python-projects] logilab-astng-0.19.3/_nodes_ast.py

2010-01-11 Thread Emile Anclin
of using it as a > cross-reference builder for Python packages. You will here from me > later. After refactoring, astng should become much easier to understand :) I hope I can finish it this month. > All the best wishes for a Happy New Year 2010, > Winfried -- Emile Anclin http://www.log

Re: [Python-projects] Three new miscellaneous pylint checks

2009-11-23 Thread Emile Anclin
tor". It isn't an error, simply it will be considered as "(+(+a))" : >>> a = 1 >>> ++a 1 >>> print +-a -1 >>> print --a 1 Maybe just a warning? -- Emile Anclin http://www.logilab.fr/ http://

Re: [Python-projects] "Line too long" prematurely when using Unicode literals

2009-11-03 Thread Emile Anclin
> PS: This email is UTF-8 formatted - The code sample should contain > Cyrillic characters. > > PPS: Thanks for this great software, and specially for the Emacs > plugin. -- Emile Anclin http://www.logilab.fr/ http://www.logilab.org/

Re: [Python-projects] A first impression of pylint

2009-07-21 Thread Emile Anclin
http://www.logilab.org/ticket/9774 and added some : http://www.logilab.org/ticket/9791 http://www.logilab.org/ticket/9787 By the way, I must be blind but I couldn't find the IDs for the checkers while suggesting an '-w' option being a shortcut for -rn --msg-cat=FEW --disa

Re: [Python-projects] A first impression of pylint

2009-07-20 Thread Emile Anclin
onally disable some of them but not the other ones, or have the warnings but not the Convention and Refactoring issues, and so on. maybe it would even be better not to produce a report by default (the import things are the messages, not the stats). -- Emile Anclin http://www.logilab.fr/