Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5: Move Pylint config to .pylintrc.toml, remove default config values #11

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 51 additions & 84 deletions {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ flake8-rst-docstrings = "^0.3.0"
ruff = "^0.5.7"
mypy = "^1.9.0"
pylint = "^3.1.0"
pylint-django = "^2.5.4"
safety = "^3.1.0"
pytest-randomly = "^3.15.0"
faker = "^28.4.1"
Expand Down Expand Up @@ -196,90 +197,6 @@ max-line-length = 100
count = true
{%- endif %}


[tool.pylint.main]
ignore = [
".git",
"__pycache__",
".venv",
"venv",
"tests",
"migrations",
"settings",
"snapshots",
]

[tool.pylint.master]
load-plugins=[
"pylint_django",
]
django-settings-module = "app.settings.base"

[tool.pylint.basic]
good-names = ["i", "j", "k", "v", "ex", "pk", "r", "_"]

[tool.pylint.classes]
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods = ["__init__", "__new__", "setUp", "asyncSetUp", "__post_init__"]

# List of member names, which should be excluded from the protected access
# warning.
exclude-protected = ["_asdict", "_fields", "_replace", "_source", "_make", "os._exit"]

# List of valid names for the first argument in a class method.
valid-classmethod-first-arg = ["cls"]

# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg = ["mcs"]

[tool.pylint.design]
max-args = 12
max-locals = 16
max-attributes = 30
max-parents = 20
min-public-methods = 0
max-public-methods = 10
max-branches = 15
max-statements = 50
max-bool-expr = 10
max-returns = 10

[tool.pylint.format]
max-line-length = 100
max-module-lines = 500

[tool.pylint."messages control"]
confidence = [
"HIGH",
"CONTROL_FLOW",
"INFERENCE",
"INFERENCE_FAILURE",
"UNDEFINED",
]
disable = [
"missing-module-docstring",
"missing-class-docstring",
"missing-function-docstring",
"unused-argument",
"redefined-builtin",
"import-outside-toplevel",
"no-else-return",
"unspecified-encoding",
"duplicate-code",
"super-with-arguments",
"unsubscriptable-object",
"abstract-method",
]

[tool.pylint.typecheck]
ignored-classes = [
"optparse.Values",
"thread._local",
"_thread._local",
"argparse.Namespace",
]


{%- if cookiecutter.linter == 'Ruff' %}
[tool.ruff]
src = ["{{cookiecutter.project_name}}"]
Expand Down Expand Up @@ -329,3 +246,53 @@ max-complexity = 10
[tool.ruff.lint.pydocstyle]
convention = "google"
{%- endif %}

[tool.pylint.main]
ignore = [
".git",
"__pycache__",
".venv",
"venv",
"tests",
"migrations",
"settings",
"snapshots",
]
disable = [
"missing-module-docstring",
"missing-class-docstring",
"missing-function-docstring",
"unused-argument",
"redefined-builtin",
"import-outside-toplevel",
"no-else-return",
"unsubscriptable-object",
"abstract-method",
]

[tool.pylint.master]
load-plugins=[
"pylint_django",
"pylint.extensions.for_any_all",
"pylint.extensions.consider_ternary_expression",
"pylint.extensions.mccabe",
]
django-settings-module = "app.settings.base"

[tool.pylint.basic]
good-names = ["i", "j", "k", "v", "ex", "pk", "r", "_"]

[tool.pylint.design]
max-args = 12
max-locals = 16
max-attributes = 30
max-parents = 20
min-public-methods = 0
max-public-methods = 10
max-branches = 15
max-statements = 50
max-bool-expr = 10
max-returns = 10

[tool.pylint.format]
max-module-lines = 500