Re: Warning in python file when i m using pychecker.

2013-04-26 Thread Dave Angel
On 04/26/2013 02:42 AM, Avnesh Shakya wrote: hi, I am trying to run my file using pychecker, but it's showing warning. I am unable to get these warning. Please help me, how to remove these warning. I am using pychecker first time. avin@HP:~/github/UdacitySiteData$ pych

Re: Warning in python file when i m using pychecker.

2013-04-26 Thread Fábio Santos
Read the warnings carefully. They are pretty clear. On 26 Apr 2013 07:48, "Avnesh Shakya" wrote: > hi, >I am trying to run my file using pychecker, but it's showing warning. I > am unable to get these warning. Please help me, how to remove these > warning. I am

Warning in python file when i m using pychecker.

2013-04-25 Thread Avnesh Shakya
hi, I am trying to run my file using pychecker, but it's showing warning. I am unable to get these warning. Please help me, how to remove these warning. I am using pychecker first time. avin@HP:~/github/UdacitySiteData$ pychecker udacity_to_jsonFinal.py Processing module udacity_to_json

Re: What does this PyChecker warning mean?

2010-06-01 Thread MrJean1
Although PyChecker 0.8.18 is quite an improvement over previous releases, it does have quirks. The PyChecker postprocessor might be helpful, see <http://code.activestate.com/recipes/546532/> /Jean On Jun 1, 4:48 am, Leo Breebaart wrote: > When fed the following code: >

Re: What does this PyChecker warning mean?

2010-06-01 Thread Terry Reedy
On 6/1/2010 8:23 AM, Peter Otten wrote: Leo Breebaart wrote: When fed the following code: def Foo(): class A(object): def __init__(self): pass class B(object): def __init__(self): pass PyChecker 0.8.18 warns: foo.py:9: Redefining

Re: What does this PyChecker warning mean?

2010-06-01 Thread Leo Breebaart
On 6/1/2010 7:53 AM, Xavier Ho wrote: > > Out of curiosity, why are you defining two classes inside a > > function? Not my code! Not my code! :-) This code was contributed by someone else, and I merely took my default action (in such cases) of running pyflakes, pychecker, and

Re: What does this PyChecker warning mean?

2010-06-01 Thread Steven W. Orr
_(self): pass PyChecker 0.8.18 warns: foo.py:9: Redefining attribute (__init__) original line (5) Out of curiosity, why are you defining two classes inside a function? -Xav In terms of constructing a minimal example, Foo might be fodder for a closure that either ret

Re: What does this PyChecker warning mean?

2010-06-01 Thread Peter Otten
Leo Breebaart wrote: > > When fed the following code: > > def Foo(): > > class A(object): > def __init__(self): > pass > > class B(object): > def __init__(self): > pass > > PyChecker 0.8.18 wa

Re: What does this PyChecker warning mean?

2010-06-01 Thread Xavier Ho
On 1 June 2010 21:48, Leo Breebaart wrote: > > When fed the following code: > > def Foo(): > >class A(object): >def __init__(self): >pass > >class B(object): >def __init__(self): >pass > > PyCheck

What does this PyChecker warning mean?

2010-06-01 Thread Leo Breebaart
When fed the following code: def Foo(): class A(object): def __init__(self): pass class B(object): def __init__(self): pass PyChecker 0.8.18 warns: foo.py:9: Redefining attribute (__init__) original line (5) I do not understand what is

Re: PyChecker under python's virtualenv

2010-02-04 Thread Diez B. Roggisch
Am 04.02.10 01:52, schrieb Steve Holden: Diez B. Roggisch wrote: Am 03.02.10 22:46, schrieb soltys: Hi Everybody, I've been doing some test on pythons' virtualenv and recently I've decided to run PyChecker. But I'm having some difficulties with importing modules available o

Re: PyChecker under python's virtualenv

2010-02-03 Thread Steve Holden
Diez B. Roggisch wrote: > Am 03.02.10 22:46, schrieb soltys: >> Hi Everybody, >> I've been doing some test on pythons' virtualenv and recently I've >> decided to run PyChecker. But I'm having some difficulties with importing >> modules availabl

pychecker and "import my.special.module as mymod"

2010-02-03 Thread News123
al/__init__.py -rw-r--r-- 1 139 2010-02-04 01:07 ./my/special/__init__.pyc -rw-r--r-- 121 2010-02-04 01:06 ./my/special/module.py -rw-r--r-- 1 159 2010-02-04 01:07 ./my/special/module.pyc -rw-r--r-- 134 2010-02-04 01:07 ./tst.py the program tst.py runs as expected: > $ python tst.py

Re: PyChecker under python's virtualenv

2010-02-03 Thread Diez B. Roggisch
Am 03.02.10 22:46, schrieb soltys: Hi Everybody, I've been doing some test on pythons' virtualenv and recently I've decided to run PyChecker. But I'm having some difficulties with importing modules available only on virtualenv by pychecker. As if it was trying to use sys

PyChecker under python's virtualenv

2010-02-03 Thread soltys
Hi Everybody, I've been doing some test on pythons' virtualenv and recently I've decided to run PyChecker. But I'm having some difficulties with importing modules available only on virtualenv by pychecker. As if it was trying to use systemwide python. I've googled about

pychecker vs pychecker2

2009-05-04 Thread qhfgva
For my edification I was looking through the source code of pychecker. I noticed that there was also a pychecker2 directory (ubuntu). The pychecker command line tool points to pychecker (w/out the 2). Does anyone know off the top of their head what this second directory is about? thanks

Re: pyflakes, pylint, pychecker - and other tools

2009-04-27 Thread Esmail
Zooko O'Whielacronx wrote: I like pyflakes. I haven't tried the others. I made a setuptools plugin named "setuptools_pyflakes". If you install that package, then "python ./setup.py flakes" runs pyflakes on your package. Regards, Thanks Zooko I decided to give all of them a try :-) Esmai

Re: pyflakes, pylint, pychecker - and other tools

2009-04-26 Thread Zooko O'Whielacronx
I like pyflakes. I haven't tried the others. I made a setuptools plugin named "setuptools_pyflakes". If you install that package, then "python ./setup.py flakes" runs pyflakes on your package. Regards, Zooko -- http://mail.python.org/mailman/listinfo/python-list

Re: Configuring pylint for local conventions (was: pyflakes, pylint, pychecker - and other tools)

2009-04-23 Thread David Stanek
aven't seen any decent documentation on doing so. > > Actually, I don't know how, I'm just repeating what was claimed at a > presentation on pylint.  ;-)  I've traditionally used pychecker myself > and haven't seen any reason to switch. I believe you just: pylint

Re: Configuring pylint for local conventions (was: pyflakes, pylint, pychecker - and other tools)

2009-04-23 Thread Aahz
know how, I'm just repeating what was claimed at a presentation on pylint. ;-) I've traditionally used pychecker myself and haven't seen any reason to switch. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "If you think it's expensive

Re: Configuring pylint for local conventions (was: pyflakes, pylint, pychecker - and other tools)

2009-04-23 Thread Jeremiah Dodds
On Thu, Apr 23, 2009 at 2:58 PM, Ben Finney > wrote: > a...@pythoncraft.com (Aahz) writes: > > > Second, you can configure pylint to respect your personal style > > How? I haven't seen any decent documentation on doing so. > > -- > \ “When we call others dogmatic, what we really object

Configuring pylint for local conventions (was: pyflakes, pylint, pychecker - and other tools)

2009-04-23 Thread Ben Finney
a...@pythoncraft.com (Aahz) writes: > Second, you can configure pylint to respect your personal style How? I haven't seen any decent documentation on doing so. -- \ “When we call others dogmatic, what we really object to is | `\ their holding dogmas that are different from our own

Re: pyflakes, pylint, pychecker - and other tools

2009-04-23 Thread Nick Craig-Wood
t heavy handled, a bit > too much PEP 8, which was intended as a > guide, rather than a prescription. I've been very happy with pychecker. I found pylint a bit too fussy (rather like the original C lint!) Note that if you run pychecker from emacs (M-x compile, then "pychecker m

Re: pyflakes, pylint, pychecker - and other tools

2009-04-22 Thread Aahz
In article , Colin J. Williams wrote: > >pylint seems a bit heavy handled, a bit too much PEP 8, which was >intended as a guide, rather than a prescription. That's half-true on both counts: First of all, any new library must be PEP 8-compliant for submission to the standard library, so PEP 8 is

Re: pyflakes, pylint, pychecker - and other tools

2009-04-22 Thread Esmail
Colin J. Williams wrote: Esmail wrote: What is the consensus of the Python community regarding these code checkers? In particular, are the stylistic recommendations that pylint makes considered sensible/valid? pylint seems a bit heavy handled, a bit too much PEP 8, Just having used this fo

Re: pyflakes, pylint, pychecker - and other tools

2009-04-22 Thread Colin J. Williams
Esmail wrote: What is the consensus of the Python community regarding these code checkers? In particular, are the stylistic recommendations that pylint makes considered sensible/valid? pylint seems a bit heavy handled, a bit too much PEP 8, which was intended as a guide, rather than a prescr

Essential tools for Python development (was: pyflakes, pylint, pychecker - and other tools)

2009-04-21 Thread Ben Finney
Esmail writes: > In particular, are the stylistic recommendations that pylint makes > considered sensible/valid? You can configure pylint extensively, to follow *your* chosen style recommendations. (Though I haven't found good documentation on how that's done.) > Are there any other tools you c

Re: pyflakes, pylint, pychecker - and other tools

2009-04-21 Thread Philip Semanchuk
On Apr 21, 2009, at 9:11 PM, Esmail wrote: What is the consensus of the Python community regarding these code checkers? You're assuming there is a consensus. =) -- http://mail.python.org/mailman/listinfo/python-list

pyflakes, pylint, pychecker - and other tools

2009-04-21 Thread Esmail
What is the consensus of the Python community regarding these code checkers? In particular, are the stylistic recommendations that pylint makes considered sensible/valid? Are there any other tools you consider essential to Python development? Thanks. Esmail -- http://mail.python.org/mailman/li

How can you make pylint/pychecker "see" setattr

2007-12-11 Thread Emin.shopper Martinian.shopper
however. On a related note, does anyone have a suggestion for a way to create a bunch of similar properties (e.g., y1, y2, y5, etc.) in a "safe" way that either pychecker or pylint can check (or at least not complain about)? Obviously I would use better names than y1, y2, etc., but in the

Question about pychecker and pylint

2007-08-05 Thread KLEIN Stephane
Hi, I wonder if pychecker projet is dead ? On pychecker home page (http://pychecker.sourceforge.net/), last version date from February 3, 2006 and their mailist contain spam messages only. Other tools like pychecker is pylint at (http://www.logilab.org/project/eid/857). This is a great tools

pychecker

2007-06-04 Thread puff
I'm new to pychecker. Some of my code generates the following No class attribute (HWND) found While HWND is not an attribute of the class, it IS an attribute of the instance created (my class is one of several classes used to create the new class). Can I use __pychecker__ to select

Pychecker

2006-12-15 Thread Okko Willeboordse
I execfile some script from another script like below i = 5 execfile(script) script uses i Running script standalone as well as running script through pychecker is not possible because script expects i I still need to run script through pychecker. I must do that from the calling script since

Re: A static pychecker?

2006-09-08 Thread skip
Edward> I am wondering whether anyone knows of a static source-code Edward> analyzer for Python, kinda like a static pychecker. Pychecker v2 was supposed to use source analysis instead of importing the modules. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: A static pychecker?

2006-09-08 Thread Jean-Paul Calderone
On Fri, 8 Sep 2006 08:00:25 -0500, "Edward K. Ream" <[EMAIL PROTECTED]> wrote: >I am wondering whether anyone knows of a static source-code analyzer for >Python, kinda like a static pychecker. > >That is, instead of being a run-time tool as pychecker is, it would be a

A static pychecker?

2006-09-08 Thread Edward K. Ream
I am wondering whether anyone knows of a static source-code analyzer for Python, kinda like a static pychecker. That is, instead of being a run-time tool as pychecker is, it would be a 'compile-time' tool. If I were writing such a thing it would use the ast returned from comp

Re: Pychecker

2006-06-09 Thread Anthony Greene
On Fri, 09 Jun 2006 11:46:59 -0700, Matt Good wrote: > Anthony Greene wrote: >> Howdy, I had the impression that pychecker caught and reported such >> dynamic syntactical errors. >> >> #!/usr/bin/env python >> >> >> def add(i): >> i += 10 &g

Re: Pychecker

2006-06-09 Thread skip
Rick> I think you're asking a lot from pychecker. Rick> kop = 1 Rick> koi = 2 Rick> if True: Rick> koo = 3 Rick> What would you like pychecker to report? I thing the OP was hoping for a "not used" error, but it can only reasonably

Re: Pychecker

2006-06-09 Thread Matt Good
Anthony Greene wrote: > Howdy, I had the impression that pychecker caught and reported such > dynamic syntactical errors. > > #!/usr/bin/env python > > > def add(i): > i += 10 > > status = 3 > > if 1 == 1: > statuss = 15 > > add(status) >

Re: Pychecker

2006-06-09 Thread Rick Zantow
Anthony Greene <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Howdy, I had the impression that pychecker caught and reported such > dynamic syntactical errors. > > #!/usr/bin/env python > > > def add(i): > i += 10 > > status = 3 > &

Pychecker

2006-06-09 Thread Anthony Greene
Howdy, I had the impression that pychecker caught and reported such dynamic syntactical errors. #!/usr/bin/env python def add(i): i += 10 status = 3 if 1 == 1: statuss = 15 add(status) === exalted sysfault$ pychecker foo.py Processing foo... Warnings

[ANN] PyChecker 0.8.17 released

2006-02-03 Thread Neal Norwitz
A new version of PyChecker is available. There are two notable new features (command line options): --only and -#/--limit. --only will only print warnings from files specified on the command line. --limit will limit the number of warnings printed. By default, only 10 warnings are

Re: Pychecker Re: Nested List Question

2005-11-02 Thread Mike Meyer
e one. >> If you want copies instead, ASK for copies...: >> gridSystemId = [ [None]*columns for x in xrange(rows) ] > Interesting, could not pychecker recognize such situations in Python > code and give warnings? Well, it could always just issue warnings everytime it saw a list mu

Re: Pychecker Re: Nested List Question

2005-11-02 Thread Chris McCoy
It may, but I haven't been using Pychecker yet. I'm still fairly new to Python. Thanks, Chris M. "Roman Suzi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thu, 3 Nov 2005, Chris McCoy wrote: > >> Thank you! I've been bang

Pychecker Re: Nested List Question

2005-11-02 Thread Roman Suzi
you observe is the only possible one. > > If you want copies instead, ASK for copies...: > > gridSystemId = [ [None]*columns for x in xrange(rows) ] Interesting, could not pychecker recognize such situations in Python code and give warnings? Sincerely yours, Roman Suzi -- [EM

Codetags (also Pylint/Pychecker + Variable declarations)

2005-10-08 Thread Fried Egg
* Codetag PEP: ** I would like to comment on the codetags PEP, which I give a 0+. I think the end "<>" is bad; I would be in favor of a block system or something that looks more like regular Python (e.g. "# :FIXME(line_count=10, date='2005-08-09', ...) "). ** As to the comments that sa

Re: PyChecker lives, version 0.8.15 released

2005-09-03 Thread Al Christians
Neal Norwitz wrote: > Special thanks to Ken Pronovici. He did a lot of work for this > release and helped ensure it occurred. > > Version 0.8.15 of PyChecker is available. It's been over a year since > the last release. Wow, time really does fly. Since it's been so

PyChecker lives, version 0.8.15 released

2005-08-31 Thread Neal Norwitz
Special thanks to Ken Pronovici. He did a lot of work for this release and helped ensure it occurred. Version 0.8.15 of PyChecker is available. It's been over a year since the last release. Wow, time really does fly. Since it's been so long I'm sure I screwed something up, trea

Re: Suppressing checking of modules with pychecker

2005-08-25 Thread MrJean1
FWIIW, We use PyChecker all the time with Python files using importing wx plus wx.grid or wx.stc, etc. and the run times vary between 5 and 15 seconds. This is Python 2.4 with wxPython 2.4.2.4 and RedHat Fedora Core 2 Linux running on a 1.2 GHz Pentium 4 M laptop. /Jean Brouwers -- http

Suppressing checking of modules with pychecker

2005-08-25 Thread Qopit
Does anyone know how to stop the command line pychecker from analyzing particular modules? It really gets slowed down on some big ones. In particular having 'import wx' takes a long while (30 - 60s). If you try pycheck'ing the program below it takes a while and prints a z

pychecker filtering

2005-07-12 Thread [EMAIL PROTECTED]
Hi, I'm trying to make a decent .pycheckrc for our project and have stumbled on a few issues. (the pychecker-list would have seemed like the appropriate place, but the S/N ratio seemed very low with all the spam) - for various reasons we decided to add an attribute to a module in the s

ANN: SPE 0.7.3.a Python IDE with wxGlade, Blender and PyChecker support

2005-03-23 Thread s_t_a_n_i
its blender support with a blender 3d object browser and its ability to run interactively inside blender. Spe ships with wxGlade (gui designer), PyChecker (source code doctor) and Kiki (regular expression console). Spe is extensible with wxGlade. This is a fix release for wxPython 2.5.4.1 If you

Re: Next step after pychecker

2005-02-02 Thread System Administrator
getting the subject of the note. Coming back to this: 1- if a is None: 2- b = 1 3- else: 4- b = "Phew" 5- b = b + 1 pychecker should be able to warn you today (but it doesn't) that you are using b to refer to objects of two different types. It's not typ

Re: Next step after pychecker

2005-02-02 Thread Sylvain Thenault
On Tue, 01 Feb 2005 16:27:48 -0600, John Roth wrote: > > "Sylvain Thenault" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> On Tue, 01 Feb 2005 05:18:12 +0100, Philippe Fremy wrote: >> >> Did you take a look at the starkiller [1] and pypy projects [2] ? > > Has anything happened

Re: Next step after pychecker

2005-02-02 Thread Steve Holden
Skip Montanaro wrote: Francis> "Every well-formed expression of the language can be assigned a Francis> type that can be deduced from the constituents of the Francis> expression alone." Bird and Wadler, Introduction to Functional Francis> Programming, 1988 Francis> This is certa

Re: Next step after pychecker

2005-02-02 Thread Francis Girard
To complete Philippe's answer : As Bird and Wadler continue : "The major consequence of the discipline imposed by strong-typing is that any expression which cannot be assigned a "sensible" type is regarded as not being well-formed and is rejected by the computer before evaluation. Such express

Re: Next step after pychecker

2005-02-02 Thread Philippe Fremy
Skip Montanaro wrote: Francis> "Every well-formed expression of the language can be assigned a Francis> type that can be deduced from the constituents of the Francis> expression alone." Bird and Wadler, Introduction to Functional Francis> Programming, 1988 Francis> This is certa

Re: Next step after pychecker

2005-02-02 Thread Francis Girard
Le mercredi 2 Février 2005 00:28, Philippe Fremy a écrit : > I really hope that pypy will provide that kind of choice. Give me python > with eiffel like contracts, super speed optimisation thank to type > inference and I will be super happy. That's also my dream. Type inference not so much for spe

Re: Next step after pychecker

2005-02-02 Thread Alex Martelli
Philippe Fremy <[EMAIL PROTECTED]> wrote: > Any other idea of a fun python improvement project I could join without > too much hassle ? I can't help but thinking that pychecker ought to be > able to do a better job. Have a look at pypy -- around the key idea of reimplementing

Re: Next step after pychecker

2005-02-02 Thread Terry Reedy
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > So I assume the language spec is basically the grammar and the > Language Reference docs[1]? Yes. The de facto governing syntax specification is the grammar file in the source code from which the parser is generate

Re: Next step after pychecker

2005-02-01 Thread Steven Bethard
Terry Reedy wrote: > Nothing about bytecode is part of the language spec. And CPython > bytecode is version specific. If the CPython implementation changed > from a virtual stack machine to a virtual register machine, as was > once discussed, the stack-oriented byte code would be replaced by a >

Re: Next step after pychecker

2005-02-01 Thread Terry Reedy
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I don't know much about what pychecker does, but if it works with the > bytecode, shouldn't it be fine for jython and IronPython? I thought the > bytecode was part of the

Re: Next step after pychecker

2005-02-01 Thread Skip Montanaro
Francis> "Every well-formed expression of the language can be assigned a Francis> type that can be deduced from the constituents of the Francis> expression alone." Bird and Wadler, Introduction to Functional Francis> Programming, 1988 Francis> This is certainly not the case fo

Re: Next step after pychecker

2005-02-01 Thread Philippe Fremy
with eiffel like contracts, super speed optimisation thank to type inference and I will be super happy. Thank everyone for its feedback. Any other idea of a fun python improvement project I could join without too much hassle ? I can't help but thinking that pychecker ought to be able to do a

Re: Next step after pychecker

2005-02-01 Thread John Roth
"Sylvain Thenault" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Tue, 01 Feb 2005 05:18:12 +0100, Philippe Fremy wrote: Did you take a look at the starkiller [1] and pypy projects [2] ? Has anything happened to Starkiller since PyCon 2004? The latest mention I can find on Google i

RE: Next step after pychecker

2005-02-01 Thread Delaney, Timothy C (Timothy)
huy wrote: > do not yet have good coverage. TDD is a quite hard to practice as a > beginner. It's even harder to bolt onto an existing codebase :( Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

Re: Next step after pychecker [StarKiller?]

2005-02-01 Thread Francis Girard
ote: > > Hi, > > Hi > > > I would like to develop a tool that goes one step further than pychecker > > to ensure python program validity. The idea would be to get close to what > > people get on ocaml: a static verification of all types of the program, > > with

Re: Next step after pychecker

2005-02-01 Thread Francis Girard
Hi, I do not want to discourage Philippe Fremy but I think that this would be very very difficult to do without modifying Python itself. What FP languages rely upon to achieve type inference is a feature named "strong typing". A clear definition of strong typing is : "Every well-formed express

Re: Next step after pychecker

2005-02-01 Thread aurora
it is very difficult to run into exception handler, some of those are added defensely. Unfortunately those untested exception sometimes fails precisely when we need it for diagnosis information. pychecker sometime give false alarm. The argument of a string interpolation may be a valid tuple. I

Re: Next step after pychecker

2005-02-01 Thread Diez B. Roggisch
> But it can be useful to restrict type variety in certain situations > e.g. prime number calculation :) And it would probably also be useful > to check violations of restrictions before running the program in > normal mode. But that's what (oca)ml and the like do - they exactly don't force you to

Re: Next step after pychecker

2005-02-01 Thread Peter Maas
: a is restricted to some_type a := yet_another_type_value # OK, another fixed type is set del a # release type restriction; a can be recreated in normal # dynamic mode The type fixing assignment could be used for optimization and for checking the pr

Re: Next step after pychecker

2005-02-01 Thread Sylvain Thenault
On Tue, 01 Feb 2005 05:18:12 +0100, Philippe Fremy wrote: > Hi, Hi > I would like to develop a tool that goes one step further than pychecker > to ensure python program validity. The idea would be to get close to what > people get on ocaml: a static verification of all types of

Re: Next step after pychecker

2005-02-01 Thread Jacek Generowicz
Paul Rubin <http://[EMAIL PROTECTED]> writes: > Philippe Fremy <[EMAIL PROTECTED]> writes: > > I would like to develop a tool that goes one step further than > > pychecker to ensure python program validity. The idea would be to get > > close to what people get o

Re: Next step after pychecker

2005-02-01 Thread huy
Paul Rubin wrote: Philippe Fremy <[EMAIL PROTECTED]> writes: I would like to develop a tool that goes one step further than pychecker to ensure python program validity. The idea would be to get close to what people get on ocaml: a static verification of all types of the program, without an

Re: Next step after pychecker

2005-01-31 Thread Steven Bethard
Philippe Fremy wrote: I would like to develop a tool that goes one step further than pychecker to ensure python program validity. The idea would be to get close to what people get on ocaml: a static verification of all types of the program, without any kind of variable declaration. This would

Re: Next step after pychecker

2005-01-31 Thread Paul Rubin
Philippe Fremy <[EMAIL PROTECTED]> writes: > I would like to develop a tool that goes one step further than > pychecker to ensure python program validity. The idea would be to get > close to what people get on ocaml: a static verification of all types > of the program, without an

Next step after pychecker

2005-01-31 Thread Philippe Fremy
Hi, I would like to develop a tool that goes one step further than pychecker to ensure python program validity. The idea would be to get close to what people get on ocaml: a static verification of all types of the program, without any kind of variable declaration. This would definitely

Re: PyChecker messages

2005-01-17 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Ben Sizer <[EMAIL PROTECTED]> wrote: >But you could use a dict of return values, or even just assigning a >different return value in each if clause. The end result is that you >have a single well-defined exit point from the function, which is >generally considered to

Re: pychecker - sets.Set need to be overridden

2005-01-17 Thread Istvan Albert
Peter Otten wrote: The Set class has implementations for __cmp__() and __hash__() that unconditionally raise an exception. pychecker assumes that these methods are "abstract", i. e. meant to be overriden by a subclass, and warns that you are instantiating an abstract base class,

Re: PyChecker messages

2005-01-17 Thread John Roth
"Ben Sizer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] But you could use a dict of return values, or even just assigning a different return value in each if clause. The end result is that you have a single well-defined exit point from the function, which is generally considered to

Re: PyChecker messages

2005-01-17 Thread Ben Sizer
But you could use a dict of return values, or even just assigning a different return value in each if clause. The end result is that you have a single well-defined exit point from the function, which is generally considered to be preferable. -- http://mail.python.org/mailman/listinfo/python-list

Re: pychecker - sets.Set need to be overridden

2005-01-17 Thread [EMAIL PROTECTED]
I don't know pychecker, maybe there's something wrong with it as your code seems valid to me. -- http://mail.python.org/mailman/listinfo/python-list

Re: pychecker - sets.Set need to be overridden

2005-01-17 Thread Peter Otten
Istvan Albert wrote: > if I have this code: > > import sets > > class Foo: > x = sets.Set() > > then pychecker says: > > test.py:4: Methods (__cmp__, __hash__) in sets.Set need to be overridden > in a subclass > > I don't get this message. Wha

Re: pychecker - sets.Set need to be overridden

2005-01-17 Thread Istvan Albert
[EMAIL PROTECTED] wrote: <__main__.Foo instance at 0x00C578A0> Set([]) on 2.4. on WinXP. What environment do you run in? I'm running it on cygwin, but still don't get it, why the warning? Istvan. -- http://mail.python.org/mailman/listinfo/python-list

Re: pychecker - sets.Set need to be overridden

2005-01-17 Thread [EMAIL PROTECTED]
mport sets class Foo: def __init__(self): self.x = sets.Set() x = Foo() print x, getattr(x, 'x') gives for me: <__main__.Foo instance at 0x00C578A0> Set([]) on 2.4. on WinXP. What environment do you run in? -- http://mail.python.org/mailman/listinfo/python-list

pychecker - sets.Set need to be overridden

2005-01-17 Thread Istvan Albert
Hello all, if I have this code: import sets class Foo: x = sets.Set() then pychecker says: test.py:4: Methods (__cmp__, __hash__) in sets.Set need to be overridden in a subclass I don't get this message. What is it trying to say, and why? Istvan. -- http://mail.python.org/mailman/lis

Re: PyChecker messages

2005-01-16 Thread Cameron Laird
return ... if ... return ... often is exactly the right definition for a specific function. I, incidentally, prefer this form over the if ... return ... elif ... return ... the original poster described. So: yes, "[g]enerally you use a dict of functions" when PyChecker thinks

Re: PyChecker messages

2005-01-11 Thread Sylvain Thenault
On Tue, 11 Jan 2005 06:54:54 +, Frans Englich wrote: > Hello, Hi > I take PyChecker partly as an recommender of good coding practice You may alos be interested by Pylint [1]. Pylint is less advanced in bug detection than pychecker, but imho its good coding practice detection i

Re: PyChecker messages

2005-01-11 Thread Eric Brunel
Frans Englich wrote: Hello, I take PyChecker partly as an recommender of good coding practice, but I cannot make sense of some of the messages. For example: runner.py:878: Function (main) has too many lines (201) What does this mean? Cannot functions be large? Or is it simply an advice that

Re: PyChecker messages

2005-01-11 Thread Roger Binns
> runner.py:878: Function (main) has too many lines (201) > > What does this mean? Cannot functions be large? Or is it simply an advice that > functions should be small and simple? It is advice. > runner.py:200: Function (detectMimeType) has too many returns (11) > > The function is simply a long

stretching a string over several lines (Re: PyChecker messages)

2005-01-10 Thread Steven Bethard
Frans Englich wrote: Also, another newbie question: How does one make a string stretch over several lines in the source code? Is this the proper way? (1) print "asda asda asda asda asda asda " \ "asda asda asda asda asda asda " \ "asda asda asda asda asda asda" A couple of other op

PyChecker messages

2005-01-10 Thread Frans Englich
Hello, I take PyChecker partly as an recommender of good coding practice, but I cannot make sense of some of the messages. For example: runner.py:878: Function (main) has too many lines (201) What does this mean? Cannot functions be large? Or is it simply an advice that functions should be