From e55f94b44a189b43888406dc36ba6f664a10aaf6 Mon Sep 17 00:00:00 2001 From: zerolab Date: Fri, 18 Oct 2024 15:57:30 +0100 Subject: [PATCH] Use the alpha pylint config --- .pylintrc | 20 +++++++++++++++----- cms/urls.py | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.pylintrc b/.pylintrc index 86b080e..e8fa55f 100644 --- a/.pylintrc +++ b/.pylintrc @@ -52,12 +52,12 @@ ignore=CVS # ignore-list. The regex matches against paths and can be in Posix or Windows # format. Because '\\' represents the directory delimiter on Windows systems, # it can't be used as an escape character. -ignore-paths= +ignore-paths=.*/migrations # Files or directories matching the regular expression patterns are skipped. # The regex matches against base names, not paths. The default value ignores # Emacs file locks -ignore-patterns=^\.# +ignore-patterns=^\.#,fabfile.py # List of module names for which member attributes should not be checked # (useful for modules/projects where namespaces are manipulated during runtime @@ -294,7 +294,7 @@ max-attributes=7 max-bool-expr=5 # Maximum number of branch for function / method body. -max-branches=12 +max-branches=15 # Maximum number of locals for function / method body. max-locals=15 @@ -337,7 +337,7 @@ indent-after-paren=4 indent-string=' ' # Maximum number of characters on a single line. -max-line-length=100 +max-line-length=120 # Maximum number of lines in a module. max-module-lines=1000 @@ -431,7 +431,17 @@ disable=raw-checker-failed, use-symbolic-message-instead, use-implicit-booleaness-not-comparison-to-string, use-implicit-booleaness-not-comparison-to-zero, - duplicate-code + duplicate-code, + missing-docstring, + subprocess-run-check, + invalid-name, + too-few-public-methods, + too-many-ancestors, + logging-fstring-interpolation, + no-member, + ungrouped-imports, + unsubscriptable-object, + protected-access # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option diff --git a/cms/urls.py b/cms/urls.py index 0c479ba..25e96a2 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -63,7 +63,7 @@ # Try to install the django debug toolbar, if exists if apps.is_installed("debug_toolbar"): - import debug_toolbar + import debug_toolbar # pylint: disable=import-error debug_urlpatterns = [path("__debug__/", include(debug_toolbar.urls)), *debug_urlpatterns]