|
|
||||||
|
#1
|
|
|
|
|
Logilab has released pylint-0.2
What's new? ----------- In addition to a large number of bug fixes, this release adds two new checkers, for missing encoding declaration, and for FIXME comments. Zope support was improved. About Pylint ------------ Pylint is a lint-like tool for Python code. It performs almost all the verifications that pychecker does, and additionally can perform some stylistic verification and coding standard enforcements. The checked code is assigned a mark based on the number and the severity of the encountered problems. The previous mark of a given piece of code is cached so that you can see if the code quality has improved since the last check. URLs |
|
|
|
#2
|
|
|
|
|
> Pylint is a lint-like tool for Python code
Does pylint only work for modules? When I tried to run it on my code file (ezpicmailer.py) , it raised an exception: No config file found, using default configuration <snip> Exception: Unable to find module for C:\photoedit\ezpicmailer in <snip> and then it gave a long list of modules in my sys.path. It seems to insist that the argument I give it be a module in sys.path, not just an arbitrary python code file. ------------------------------------------ "Alexandre Fayolle" <Alexandre.Fayolle> wrote in message news:list Logilab has released pylint-0.2 What's new? ----------- In addition to a large number of bug fixes, this release adds two new checkers, for missing encoding declaration, and for FIXME comments. Zope support was improved. About Pylint ------------ Pylint is a lint-like tool for Python code. It performs almost all the verifications that pychecker does, and additionally can perform some stylistic verification and coding standard enforcements. The checked code is assigned a mark based on the number and the severity of the encountered problems. The previous mark of a given piece of code is cached so that you can see if the code quality has improved since the last check. URLs |
|
#3
|
|
|
|
|
I get the same error.
I tried to find documentation to see whether I was using Pylint correctly or not but there isn't any. There seems to have been an attempt at providing the possible command line options (python pylint.py --help) but I don't find them particularly self-explanatory - so without documentation and the apparent ability to "run out of the box", I guess I'll just have to give this one a miss. One nice thing that has happened is it has led me to the Optik package (Option parsing). There is some nice documentation for this package - the author(s) of Pylint could take some direction from this package if they really want people to use Pylint (I have a personal hangup with people who write good, useful packages and then don't bother documenting them - life is just too short to read somebody else'e code to get around this deficiency :-) I get frustrated however when I think there is something that I could be taking advantage of but something as simple as the lack of 0.5hr of documentation stops me :-( ). In the meantime, I'll just have to watch this space :-) Peter "Mark Hahn" <mark> wrote in message news:ad04 [..] |
|
#4
|
|
|
|
|
Peter Milliken wrote:
> > I get the same error. [snip] > (I have a personal hangup with people who > write good, useful packages and then don't bother documenting them - life is > just too short to read somebody else'e code to get around this deficiency > :-) I get frustrated however when I think there is something that I could be > taking advantage of but something as simple as the lack of 0.5hr of > documentation stops me :-( ). Maybe RTFM would help. See http://www.logilab.org/projects/pylint/documentation and note the "dependancies" (sic) line which states "Pylint requires the logilab-common(version >= 0.2.1) and the optik packages." If you download the "Common libraries" from the links provided on that page, I suspect it will work better. Unfortunately, by posting the direct link to the download I suspect Alexandre led people astray by implying that a single download might be enough to make this work. -Peter |
|
#5
|
|
|
|
|
"Peter Milliken" <peterm> writes:
[...] > One nice thing that has happened is it has led me to the Optik package [...] Optik is now in 2.3 standard library, renamed as the optparse module. John |
|
#6
|
|
|
|
|
Hi Peter,
No, I caught all of the dependencies that are required (common libraries and optik - I think that is all that is required). I installed both of them before attempting to run pylint and still received that error. Perhaps the install is order dependent i.e. I installed pylint, then the "common libraries" then the optik package. Does Pylint work for you? Peter "Peter Hansen" <peter> wrote in message news:3a1f > Peter Milliken wrote: > > > > I get the same error. > [snip] > > (I have a personal hangup with people who > > write good, useful packages and then don't bother documenting them - life is > > just too short to read somebody else'e code to get around this deficiency > > :-) I get frustrated however when I think there is something that I could be > > taking advantage of but something as simple as the lack of 0.5hr of > > documentation stops me :-( ). > > Maybe RTFM would help. See http://www.logilab.org/projects/pylint/documentation and [..] |
|
#7
|
|
|
|
|
They not only feel no need to document, they also feel no need to follow ANN
threads they start. "Peter Milliken" <peterm> wrote in message news:4805 [..] |
|
#8
|
|
|
|
|
"Mark Hahn" <mark> writes:
> They not only feel no need to document, they also feel no need to follow ANN > threads they start. Sorry, I don't have the time to follow c.l.py at the moment and that's just today that I've been informed about this thread. So, regarding the command line, pylint expects the name of a package or module as argument. As a convenience, you can give to it a file name if it's possible to guess a module name from the file's path, using the python path. Some examples : "pylint mymodule.py" should always works since the current working directory is automatically added on top of the python path "pylint directory/mymodule.py" will work if "directory" is a python package (i.e. has an __init__.py file) or if "directory" is in the python path. "pylint /whatever/directory/mymodule.py" will work if either: - "/whatever/directory" is in the python path - your cwd is "/whatever/directory" - "directory" is a python package and "/whatever" is in the python path - "directory" is a python package and your cwd is "/whatever" and so on... Regarding the lack of documentation, we're pretty busy at this time at logilab, but I hope we'll have the time to write some until the next release... Anyway, any contribution would be welcome ;) Hope that helps, regards |
|
#9
|
|
|
|
|
Sorry mate, but I am in the same directory of the Python file I am trying to
run through pylint and I get the same message originally posted by Mark Hahn. So something is wrong - perhaps you should verify that what is on the web-site is actually working as you expect? Here is the full error message from one of my runs: roebourne#1(~/swimming)$ python c:/Python22/Lib/site-packages/logilab/pylint/lint.py roll.py No config file found, using default configuration Traceback (most recent call last): File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 529, in ? Run(*sys.argv[1:]) File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 496, in __init__ modname = '.'.join(modpath_from_file(modname)) File "c:\Python22\Lib\site-packages\logilab\common\modutils.py", line 70, in modpath_from_file raise Exception('Unable to find module for %s in %s' % ( Exception: Unable to find module for c:\usr\local\swimming\roll in c:\usr\local\swimming, c:/Python22/Lib/site-packages/logilab/pylint, c:\Python22, c:\Python22\DLLs, c:\Python22\Lib, c:\Python22\Lib\lib-tk, c:\usr\local\swimming, c:\Python22\lib\site-packages, c:\usr\local\share\emacs\site-lisp\pymacs [exited with 1] Note that I am running Python 2.2.2. Peter "Sylvain "Thénault"" <sylvain.thenault> wrote in message news:5fsf [..] |
|
#10
|
|
|
|
|
On Wednesday 01 October à 07:42, Peter Milliken wrote:
> Sorry mate, but I am in the same directory of the Python file I am trying to > run through pylint and I get the same message originally posted by Mark > Hahn. > > So something is wrong - perhaps you should verify that what is on the > web-site is actually working as you expect? ok, that was actually a problem in the common library. I've just made a new release which should fix this problem : ftp://ftp.logilab.fr/pub/common/common-0.3.3.tar.gz |
|
#11
|
|
|
|
|
Peter Milliken wrote:
> > No, I caught all of the dependencies that are required (common libraries and > optik - I think that is all that is required). I installed both of them > before attempting to run pylint and still received that error. Perhaps the > install is order dependent i.e. I installed pylint, then the "common > libraries" then the optik package. > > Does Pylint work for you? Sorry, I was jumping to conclusions. I got the same message you did, after a pylint-only install, so then I visited the web site and saw the notes about common and posted my response. Didn't actually try it out yet. Thanks to Sylvain for posting the fix that resolves this. (Assuming it does... anyone try it yet? ;-) -Peter |
|
#12
|
|
|
|
|
Getting closer but still no prizes :-)
Installed the supplied common and re-ran with the following result: roebourne#1(~/swimming)$ python c:/Python22/Lib/site-packages/logilab/pylint/lint.py roll.py No config file found, using default configuration An error occured while parsing roll Traceback (most recent call last): File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 529, in ? Run(*sys.argv[1:]) File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 497, in __init__ linter.check(modname) File "c:/Python22/Lib/site-packages/logilab/pylint/lint.py", line 230, in check astng = self.manager.astng_from_module_name(mod_name) File "c:\Python22\Lib\site-packages\logilab\common\astng\manager.py", line 85, in astng_from_module_name return self.astng_from_module(module, norm_mod_name) File "c:\Python22\Lib\site-packages\logilab\common\astng\manager.py", line 62, in astng_from_module astng = self._builder.build_from_module(module, mod_name) File "c:\Python22\Lib\site-packages\logilab\common\astng\astng.py", line 179, in build_from_module astng = self._string_build(data) File "c:\Python22\Lib\site-packages\logilab\common\astng\astng.py", line 234, in _string_build ast = parser.suite(data + linesep) parser.ParserError: could not parse string [exited with 1] I assume that we are getting closer? :-) Peter "Sylvain Thénault" <Sylvain.Thenault> wrote in message news:list > On Wednesday 01 October à 07:42, Peter Milliken wrote: > > Sorry mate, but I am in the same directory of the Python file I am trying to [..] |
|
|
| Similar Threads | |
| pylint naming conventions? Hi, as someone who is still learning a lot about Python I am making use of all the tools that can help me, such as pyflakes, pychecker and pylint. I am confused by pylint's... |
|
| working pylint anyone? Hi, until yesterday I was a happy user of pylint. Then I upgraded to ubuntu hardy heron - and the trouble began. The packaged version of pylint (0.13.2) fails with this... |
|
| patching pylint.el Hi, I think this is a bug of pylint.el. But I failed finding a way to submit the bug neither in its official site nor in google. So I post it here wishing it may be useful... |
|
| PyLint results? Hello: I ran the new pylint and my code and I had a few questions on why those are warnings or what I can do to fix them: 1) W: 0: Too many lines in module (1587) Why is... |
|
| [ANN] PyLint 0.11 / astng 0.16 Hi there! I'm please to announce new releases of pylint (0.11) and its underlying library astng (0.16). Those releases should fix a number of crashes and false positive and... |
|
|
All times are GMT. The time now is 12:48 PM. | Privacy Policy
|