2015-01-11 5 views
2

을 linting 중지 :PyLint, 나는 함께 <p>설치 pylint 우분투 14.04</p>을 사용하고 파이썬 런타임

sudo apt-get install pylint 

내가 시장을 통해 일식 루나 설치를 PyDev를 다운로드했습니다. 하지만 내 코드를 linting 대신 내 파이썬 런타임 linted입니다.

내 콘솔 출력 :

PyLint: Executing command line: /usr/bin/pylint /home/devnull/pyworkspace/soup/test1.py 
PyLint: The stdout of the command line is: 
PyLint: The stderr of the command line is: File "/usr/lib/python3.4/site.py", line 182 
    file=sys.stderr) 
    ^
SyntaxError: invalid syntax 

내 설정 : 내가 잘못 구성 무엇

pylint eclipse

어떤 생각? 터미널에서 pylint를 실행하면 모든 것이 잘 동작합니다. 터미널에서

업데이트 내 출력 :

No config file found, using default configuration 
************* Module test1 
C: 14, 0: Line too long (104/80) (line-too-long) 
C: 14, 0: Exactly one space required after comma 
    return "{0}_{1}.html".format(date.today().strftime('%y_%m_%d'),   str(uuid.uuid4()).replace('-','_')) 
                            ^(bad-whitespace) 
C: 25, 0: Line too long (112/80) (line-too-long) 
C: 37, 0: Exactly one space required after comma 
with codecs.open(os.path.join(path,filename()),'w',encoding='utf8') as f: 
           ^(bad-whitespace) 
C: 37, 0: Exactly one space required after comma 
with codecs.open(os.path.join(path,filename()),'w',encoding='utf8') as f: 
              ^(bad-whitespace) 
C: 37, 0: Exactly one space required after comma 
with codecs.open(os.path.join(path,filename()),'w',encoding='utf8') as f: 
               ^(bad-whitespace) 
C: 1, 0: Missing module docstring (missing-docstring) 
F: 3, 0: Unable to import 'bs4' (import-error) 
F: 10, 0: Unable to import 'selenium' (import-error) 
F: 11, 0: Unable to import 'selenium.webdriver.common.keys' (import-error) 
C: 13, 0: Missing function docstring (missing-docstring) 
C: 16, 0: Invalid constant name "path" (invalid-name) 
C: 21, 0: Invalid constant name "driver" (invalid-name) 
C: 30, 0: Invalid constant name "content" (invalid-name) 
C: 33, 0: Invalid constant name "soup" (invalid-name) 
W: 53,-1: String statement has no effect (pointless-string-statement) 
W: 11, 0: Unused import Keys (unused-import) 


Report 
====== 
24 statements analysed. 

Raw metrics 
----------- 

+----------+-------+------+---------+-----------+ 
|type  |number |%  |previous |difference | 
+==========+=======+======+=========+===========+ 
|code  |35  |79.55 |35  |=   | 
+----------+-------+------+---------+-----------+ 
|docstring |0  |0.00 |0  |=   | 
+----------+-------+------+---------+-----------+ 
|comment |1  |2.27 |1  |=   | 
+----------+-------+------+---------+-----------+ 
|empty  |8  |18.18 |8  |=   | 
+----------+-------+------+---------+-----------+ 



**other output omitted ** 

PyLint --version :

No config file found, using default configuration 
pylint 1.1.0, 
astroid 1.0.1, common 0.61.0 
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] 

내 런타임 :

myruntime

+0

을 scipy했다? 파이썬 3을 사용하고 싶습니까? 파이썬 2가 설치되어 있습니까? Eclipse에서 사용하는 Python의 버전은 무엇입니까? –

+0

예 파이썬 3을 보풀 싶습니다. 파이썬 2도 설치되어 있고, Eclipse에서 Python 3을 사용합니다. 나는 출력과 필림트 버전의 출력을 더했다. 어쩌면 내 필린 트 버전이 오래 되었을까? apt-get보다 pylint를 설치해서는 안되나요? – svenhornberg

답변

1

난 그냥 같은 문제를 가지고 . python 2.7 및 python 3.4를 사용했습니다.

apt-get install pylint 

과 같은 오류가 발생했습니다.

은 그 때 나는
apt-get install pylint3 

를 instaled 및

/usr/bin/pylint3 

에 pylint 실행 파일의 위치를 ​​업데이트하고 일했다.

모듈을 설치할 때 특정 파이썬 주 버전 번호를 대상으로 지정해야합니다.

나는 NumPy와 동일한 작업을 수행하고 "는/usr/빈/pylint의 /home/devnull/pyworkspace/soup/test1.py"를 실행하면 예상대로 따라서 작동 등