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)
请注意无法导入,但我的脚本工作正常。这是有问题的代码:
#!/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
pylint sendmail.py
我从http://www.logilab.org/安装了 pylint 和 logilab 库
python 64 和 32 位都以同样的方式抱怨,使用 python 2.6.6。