摘要:https://www.manongdao.com/article-1002862.html
对external.py不检查,在文件中设置: # pylint: skip-file
# -*- coding: utf-8 -*-
# @Time : 2021/5/17 15:18
# @File : external.py
# @Software: PyCharm
# pylint: skip-file
from pysdk.first_layer import BaseLayer
class Events(BaseLayer):
def __init__(self):
# pylint: disable=C0115
super(Events, self).__init__()
class Metrics(BaseLayer):
def __init__(self):
super(Metrics, self).__init__()
对external.py中’W’类型不检查,在文件中设置: # pylint: disable=W
# -*- coding: utf-8 -*-
# @Time : 2021/5/17 15:18
# @File : external.py
# @Software: PyCharm
# pylint: disable=W
from pysdk.first_layer import BaseLayer
class Events(BaseLayer):
def __init__(self):
super(Events, self).__init__()
class Metrics(BaseLayer):
def __init__(self):
super(Metrics, self).__init__()
对external.py中’W,R,E’类型不检查,在文件中类下函数或普通函数下设置: # pylint: disable=W,E,R
# -*- coding: utf-8 -*-
# @Time : 2021/5/17 15:18
# @File : external.py
# @Software: PyCharm
from pysdk.first_layer import BaseLayer
class Events(BaseLayer):
def __init__(self):
# pylint: disable=W,R,E
super(Events, self).__init__()
def __init__(self):
super(Events, self).__init__()
class Metrics(BaseLayer):
def __init__(self):
super(Metrics, self).__init__()
对external.py中’W,R,E’类型不检查,在文件中类下面设置: # pylint: disable=W,E,R
# -*- coding: utf-8 -*-
# @Time : 2021/5/17 15:18
# @File : external.py
# @Software: PyCharm
from pysdk.first_layer import BaseLayer
class Events(BaseLayer):
# pylint: disable=W,R,E
def __init__(self):
super(Events, self).__init__()
def __init__(self):
super(Events, self).__init__()
class Metrics(BaseLayer):
def __init__(self):
super(Metrics, self).__init__()
$ pylint --disable=W external.py
# 生成pyLintrc.conf
pylint --generate-rcfile > pyLintrc.conf
# vim pyLintrc.conf 修改配置文件
[MESSAGES CONTROL]
disable=W