Skip to content

Commit

Permalink
enable pylint via pants
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd committed Dec 6, 2022
1 parent 395c869 commit 9ac8365
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ backend_packages = [
"pants.backend.python.lint.bandit",
"pants.backend.python.lint.black",
"pants.backend.python.lint.flake8",
"pants.backend.python.lint.pylint",

# shell
"pants.backend.shell",
Expand Down Expand Up @@ -96,7 +97,7 @@ interpreter_constraints = [

[python.resolves]
st2 = "lockfiles/st2.lock"
pylint_plugins = "lockfiles/pylint_plugins.lock"
pylint_plugins = "lockfiles/pylint_plugins.lock" # lockfiles/pylint.lock should have same contents

[python.resolves_to_constraints_file]
# Our direct requirements are in requirements-pants.txt;
Expand Down Expand Up @@ -146,10 +147,22 @@ extra_requirements = [
config = "lint-configs/python/.flake8"

[pylint]
lockfile = "lockfiles/pylint.lock"
version = "pylint~=2.8.2"
extra_requirements = [
"setuptools", # includes pkg_resources
]
config = "lint-configs/python/.pylintrc"
source_plugins = [
# the /pylint_plugins directory
"pylint_plugins",
]
args = [
# needed in st2* components, runners, packs
"--load-plugins=pylint_plugins.api_models",
# needed in st2* components, runners
"--load-plugins=pylint_plugins.db_models",
]

[regex-lint]
config = "@lint-configs/regex-lint.yaml"

0 comments on commit 9ac8365

Please sign in to comment.