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
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
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
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
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://
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
.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
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://
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
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
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
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/
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
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 ?
--
;
> 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
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
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
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:
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/
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
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
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
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
___
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
___
: 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
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
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
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
> 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/
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
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
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
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
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
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
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&
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
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
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
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
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
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/
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
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
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.
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
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
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
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
_
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-
: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
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
>>> 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
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
; 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
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
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
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
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
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
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.
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
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'
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
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://
> 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/
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
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/
68 matches
Mail list logo