Skip to content

Commit

Permalink
Merge pull request #524 from JohnVillalovos/jlvillal/pylint
Browse files Browse the repository at this point in the history
chore: add initial `pylint` check
  • Loading branch information
NicolasLM authored Aug 23, 2023
2 parents 5f67f16 + e03736d commit 9dc72f0
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ jobs:
run: tox -e isort -- --check
- name: Run flake8 (https://flake8.pycqa.org/en/latest/)
run: tox -e flake8
- name: Run pylint Python code static checker (https://github.com/PyCQA/pylint)
run: tox -e pylint
47 changes: 47 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,50 @@ module = [
"setup",
]
ignore_errors = true

[tool.pylint.messages_control]
max-line-length = 88
jobs = 0 # Use auto-detected number of multiple processes to speed up Pylint.
# TODO(jlvillal): Work on removing these disables over time.
disable = [
"attribute-defined-outside-init",
"bad-classmethod-argument",
"broad-exception-caught",
"consider-using-f-string",
"consider-using-in",
"consider-using-ternary",
"consider-using-with",
"deprecated-method",
"fixme",
"import-error",
"import-outside-toplevel",
"inconsistent-return-statements",
"invalid-name",
"line-too-long",
"missing-class-docstring",
"missing-function-docstring",
"missing-module-docstring",
"no-else-break",
"no-else-continue",
"no-else-return",
"no-value-for-parameter",
"protected-access",
"raise-missing-from",
"signature-differs",
"simplifiable-if-statement",
"super-with-arguments",
"too-few-public-methods",
"too-many-arguments",
"too-many-boolean-expressions",
"too-many-branches",
"too-many-instance-attributes",
"too-many-lines",
"too-many-public-methods",
"try-except-raise",
"undefined-loop-variable",
"unnecessary-pass",
"unused-argument",
"use-dict-literal",
"use-list-literal",
"useless-object-inheritance",
]
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ black==22.3.0
flake8==4.0.1
isort==5.12.0
mypy==1.5.1
pylint==2.17.5
7 changes: 6 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
skipsdist = True
minversion = 3.0
envlist=py37,py38,py39,py310,py311,black,isort,flake8,mypy
envlist=py37,py38,py39,py310,py311,black,isort,flake8,mypy,pylint

[testenv]
commands=python -m unittest
Expand All @@ -27,6 +27,11 @@ basepython = python3
commands =
mypy {posargs}

[testenv:pylint]
basepython = python3
commands =
pylint {posargs} imapclient/

[flake8]
exclude = .git,.venv,.tox,dist,doc,*egg,build,
max-line-length = 88
Expand Down

0 comments on commit 9dc72f0

Please sign in to comment.