@@ -15,6 +15,7 @@ backend_packages = [
1515 " pants.backend.python.lint.bandit" ,
1616 " pants.backend.python.lint.black" ,
1717 " pants.backend.python.lint.flake8" ,
18+ " pants.backend.python.lint.pylint" ,
1819
1920 # shell
2021 " pants.backend.shell" ,
@@ -96,7 +97,7 @@ interpreter_constraints = [
9697
9798[python .resolves ]
9899st2 = " lockfiles/st2.lock"
99- pylint_plugins = " lockfiles/pylint_plugins.lock"
100+ pylint_plugins = " lockfiles/pylint_plugins.lock" # lockfiles/pylint.lock should have same contents
100101
101102[python .resolves_to_constraints_file ]
102103# Our direct requirements are in requirements-pants.txt;
@@ -146,10 +147,22 @@ extra_requirements = [
146147config = " lint-configs/python/.flake8"
147148
148149[pylint ]
150+ lockfile = " lockfiles/pylint.lock"
149151version = " pylint~=2.8.2"
150152extra_requirements = [
151153 " setuptools" , # includes pkg_resources
152154]
155+ config = " lint-configs/python/.pylintrc"
156+ source_plugins = [
157+ # the /pylint_plugins directory
158+ " pylint_plugins" ,
159+ ]
160+ args = [
161+ # needed in st2* components, runners, packs
162+ " --load-plugins=pylint_plugins.api_models" ,
163+ # needed in st2* components, runners
164+ " --load-plugins=pylint_plugins.db_models" ,
165+ ]
153166
154167[regex-lint ]
155168config = " @lint-configs/regex-lint.yaml"
0 commit comments