mirror of
https://github.com/certbot/certbot.git
synced 2025-07-28 21:42:01 +03:00
Safer to pylint on Python 3
This commit is contained in:
@ -22,7 +22,7 @@ persistent=yes
|
|||||||
|
|
||||||
# List of plugins (as comma separated values of python modules names) to load,
|
# List of plugins (as comma separated values of python modules names) to load,
|
||||||
# usually to register additional checkers.
|
# usually to register additional checkers.
|
||||||
load-plugins=linter_plugin
|
load-plugins=
|
||||||
|
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
[MESSAGES CONTROL]
|
||||||
|
@ -9,6 +9,8 @@ from astroid import nodes
|
|||||||
|
|
||||||
def register(unused_linter):
|
def register(unused_linter):
|
||||||
"""Register this module as PyLint plugin."""
|
"""Register this module as PyLint plugin."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def _transform(cls):
|
def _transform(cls):
|
||||||
# fix the "no-member" error on instances of
|
# fix the "no-member" error on instances of
|
||||||
@ -17,9 +19,9 @@ def _transform(cls):
|
|||||||
|
|
||||||
# TODO: this is too broad and applies to any tested class...
|
# TODO: this is too broad and applies to any tested class...
|
||||||
|
|
||||||
if cls.slots() is not None:
|
#if cls.slots() is not None:
|
||||||
for slot in cls.slots():
|
# for slot in cls.slots():
|
||||||
cls.locals[slot.value] = [nodes.EmptyNode()]
|
# cls.locals[slot.value] = [nodes.EmptyNode()]
|
||||||
|
|
||||||
if cls.name == 'JSONObjectWithFields':
|
if cls.name == 'JSONObjectWithFields':
|
||||||
# _fields is magically introduced by JSONObjectWithFieldsMeta
|
# _fields is magically introduced by JSONObjectWithFieldsMeta
|
||||||
|
6
setup.py
6
setup.py
@ -1,7 +1,6 @@
|
|||||||
import codecs
|
import codecs
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools import find_packages
|
from setuptools import find_packages
|
||||||
@ -52,14 +51,13 @@ install_requires = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
dev_extras = [
|
dev_extras = [
|
||||||
# Pin astroid==1.3.5, pylint==1.4.2 as a workaround for #289
|
'astroid',
|
||||||
'astroid==1.3.5',
|
|
||||||
'coverage',
|
'coverage',
|
||||||
'ipdb',
|
'ipdb',
|
||||||
'pytest',
|
'pytest',
|
||||||
'pytest-cov',
|
'pytest-cov',
|
||||||
'pytest-xdist',
|
'pytest-xdist',
|
||||||
'pylint==1.4.2', # upstream #248
|
'pylint>=1.8.4',
|
||||||
'tox',
|
'tox',
|
||||||
'twine',
|
'twine',
|
||||||
'wheel',
|
'wheel',
|
||||||
|
1
tox.ini
1
tox.ini
@ -117,6 +117,7 @@ basepython = python2.7
|
|||||||
# continue, but tox return code will reflect previous error
|
# continue, but tox return code will reflect previous error
|
||||||
commands =
|
commands =
|
||||||
{[base]install_packages}
|
{[base]install_packages}
|
||||||
|
pip install --upgrade astroid pylint # required!
|
||||||
pylint --reports=n --rcfile=.pylintrc {[base]source_paths}
|
pylint --reports=n --rcfile=.pylintrc {[base]source_paths}
|
||||||
|
|
||||||
[testenv:mypy]
|
[testenv:mypy]
|
||||||
|
Reference in New Issue
Block a user