Pylint Jython入门(jython2.5.1) [英] Getting started with Pylint for Jython (jython2.5.1)

查看:127
本文介绍了Pylint Jython入门(jython2.5.1)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有大量的Jython脚本可用于我们的部署自动化.我希望Pylint可以加入我们的构建流程.

We have a ton of Jython scripts for our deployment automation; I'd like Pylint to be part of our build pipeline.

我从此处下载并安装了logilab-astng,logilab-common和pylint: http://www.logilab. org/857

I downloaded and installed logilab-astng, logilab-common and pylint from here: http://www.logilab.org/857

我使用以下命令成功安装了logilab库:

I installed the logilab libraries successfully using:

jython setup.py install

但是,当我尝试安装pylint时,得到以下输出:

However, when I attempt to install pylint i get the following output:

C:\temp\pylint-0.22.0.tar.gz\pylint-0.22.0>jython setup.py install
running install
running build
running build_py
package init file '.\test\__init__.py' not found (or not a regular file)
package init file '.\test\__init__.py' not found (or not a regular file)
running build_scripts
creating build\scripts-2.5
copying and adjusting bin\pylint -> build\scripts-2.5
copying and adjusting bin\pylint-gui -> build\scripts-2.5
copying and adjusting bin\symilar -> build\scripts-2.5
copying and adjusting bin\epylint -> build\scripts-2.5
copying and adjusting bin\pyreverse -> build\scripts-2.5
changing mode of build\scripts-2.5\pylint from 666 to 777
changing mode of build\scripts-2.5\pylint-gui from 666 to 777
changing mode of build\scripts-2.5\symilar from 666 to 777
changing mode of build\scripts-2.5\epylint from 666 to 777
changing mode of build\scripts-2.5\pyreverse from 666 to 777
running install_lib
byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_continue_not_in_loop.py to func_continue_not_in_l
oop$py.class
  File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_continue_not_in_loop.py", line 8

   ^
SyntaxError: 'continue' not properly in loop

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_nonascii_noencoding.py to func_nonascii_noencodin
g$py.class
SyntaxError: ("Non-ASCII character in file 'C:\\jython2.5.1\\Lib\\site-packages\\pylint\\test\\input\\func_nonascii_noen
coding.py', but no encoding declared; see http://www.python.org/peps/pep-0263.html for details",)

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_return_outside_func.py to func_return_outside_fun
c$py.class
  File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_return_outside_func.py", line 3

   ^
SyntaxError: 'return' outside function

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_return_yield_mix.py to func_return_yield_mix$py.c
lass
  File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_return_yield_mix.py", line 8

   ^
SyntaxError: 'return' with argument inside generator

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_return_yield_mix2.py to func_return_yield_mix2$py
.class
  File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_return_yield_mix2.py", line 8

   ^
SyntaxError: 'return' with argument inside generator

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_syntax_error.py to func_syntax_error$py.class
  File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_syntax_error.py", line 1
    def toto
           ^
SyntaxError: mismatched input '\n' expecting LPAREN

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_unknown_encoding.py to func_unknown_encoding$py.c
lass
  File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_unknown_encoding.py", line 1

   ^
SyntaxError: Unknown encoding: IBO-8859-1

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_w0705.py to func_w0705$py.class
  File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_w0705.py", line 29

   ^
SyntaxError: default 'except:' must be last

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_wrong_encoding.py to func_wrong_encoding$py.class

SyntaxError: ("Illegal character in file 'C:\\jython2.5.1\\Lib\\site-packages\\pylint\\test\\input\\func_wrong_encoding.
py' for encoding 'UTF-8'",)

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_yield_outside_func.py to func_yield_outside_func$
py.class
  File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func_yield_outside_func.py", line 3

   ^
SyntaxError: 'yield' outside function

byte-compiling C:\jython2.5.1\Lib\site-packages\pylint\test\input\func___future___import_not_first_stmt.py to func___fut
ure___import_not_first_stmt$py.class
  File "C:\jython2.5.1\Lib\site-packages\pylint\test\input\func___future___import_not_first_stmt.py", line 4

   ^
SyntaxError: from __future__ imports must occur at the beginning of the file

running install_scripts
copying build\scripts-2.5\epylint -> C:\jython2.5.1\bin
copying build\scripts-2.5\pylint -> C:\jython2.5.1\bin
copying build\scripts-2.5\pylint-gui -> C:\jython2.5.1\bin
copying build\scripts-2.5\pyreverse -> C:\jython2.5.1\bin
copying build\scripts-2.5\symilar -> C:\jython2.5.1\bin
changing mode of C:\jython2.5.1\bin\epylint to 777
changing mode of C:\jython2.5.1\bin\pylint to 777
changing mode of C:\jython2.5.1\bin\pylint-gui to 777
changing mode of C:\jython2.5.1\bin\pyreverse to 777
changing mode of C:\jython2.5.1\bin\symilar to 777
running install_egg_info
Removing C:\jython2.5.1\Lib\site-packages\pylint-0.22.0-py2.5.egg-info
Writing C:\jython2.5.1\Lib\site-packages\pylint-0.22.0-py2.5.egg-info

有什么想法吗?

推荐答案

您不应尝试编译测试文件:其中一些是故意破坏的(它们是pylint的测试输入).

you should not try to compile the test files : some of them are broken on purpose (they are test inputs for pylint).

这篇关于Pylint Jython入门(jython2.5.1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆