1
No config file found, using default configuration
************* Module sendmail
C:153,0: Line too long (146/80)
C:156,0: Line too long (105/80)
C:190,0: Line too long (88/80)
F: 8,0: Unable to import 'email.MIMEMultipart'
E: 8,0: No name 'MIMEMultipart' in module 'email'
F: 9,0: Unable to import 'email.MIMEBase'
E: 9,0: No name 'MIMEBase' in module 'email'
E: 10,0: No name 'Encoders' in module 'email'
R: 47,0:sendmail: Too many arguments (7/5)
R: 47,0:sendmail: Too many local variables (17/15)
W: 74,4:sendmail: No exception type(s) specified
W: 95,12:sendmail: No exception type(s) specified
R:142,0:commandline_handler: Too many branches (15/12)
注意無法導入,但我的腳本正常工作。這裏是有問題的代碼:Pylint給出錯誤,但代碼工作正常
#!/usr/local/bin/python
''' sendmail module.
Can be used to send mail, attachments, or otherwise.
'''
from email.mime.text import MIMEText
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email import Encoders
import getopt
import os
import smtplib
import sys
def main():
當我運行該程序時,它工作得很好,但爲什麼pylint抱怨?
我跑通過簡單地做
pylint sendmail.py
我安裝pylint的和logilab庫從http://www.logilab.org/
兩個蟒64位和32位抱怨同樣的方式,使用Python 2.6.6 pylint的。