Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.ci/pylint.sh84
-rw-r--r--pylintrc104
2 files changed, 72 insertions, 116 deletions
diff --git a/.ci/pylint.sh b/.ci/pylint.sh
index 962d52022..a377167b4 100755
--- a/.ci/pylint.sh
+++ b/.ci/pylint.sh
@@ -5,86 +5,20 @@ set -e
PYLINT=${PYLINT:-pylint}
-# Errors which are covered by pyright
-#
-# E1101 no-member
-# E1102 not-callable
-# E1111 assignment-from-no-return
-# E1120 no-value-for-parameter
-# E1121 too-many-function-args
-# E1123 unexpected-keyword-arg
-# E1124 redundant-keyword-arg
-# E1125 missing-kwoa
-# E1126 invalid-sequence-index
-# E1127 invalid-slice-index
-# E1128 assignment-from-none
-# E1129 not-context-manager
-# E1130 invalid-unary-operand-type
-# E1131 unsupported-binary-operation
-# E1132 repeated-keyword
-# E1133 not-an-iterable
-# E1134 not-a-mapping
-# E1135 unsupported-membership-test
-# E1136 unsubscriptable-object
-# E1137 unsupported-assignment-operation
-# E1138 unsupported-delete-operation
-# E1139 invalid-metaclass
-# E1140 unhashable-dict-key
-# E1141 dict-iter-missing-items
-# E1142 await-outside-async
-# I1101 c-extension-no-member
-# W0212 protected-access
-# W1113 keyword-arg-before-vararg
-# W1114 arguments-out-of-order
-# W1115 non-str-assignment-to-dunder-name
-# W1116 isinstance-second-argument-not-valid-type
-
-IGNORE_FLAKE8='C0301,W0611'
-
-IGNORE_PYRIGHT='E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1140,E1141,E1142,I1101,W0212,W1113,W1114,W1115,W1116'
-
-IGNORE_ALWAYS='R0801,C0209,W0237,W0707,R1732,W1404,W1406,R1725'
-
-IGNORE_ERRORS=C0103,C0302,C0301,C0330,C0411,C0415,E0401,E0611,R0201,R0901,R0904,R0912,R0913,R0914,R0915,R0916,R1702,R1710,W0201,W0221,W0223,W0231,W0233,W0603,W0613
-
-IGNORE_GTK_MODULE_ERRORS=C0103,C0301,C0330,C0415,E0401,E0611,R0201,R0904,R0915,R1710,W0201,W0233,W0221,W0613
-
-"$PYLINT" --version
-
-"$PYLINT" --disable="$IGNORE_PYRIGHT,$IGNORE_ALWAYS,$IGNORE_FLAKE8,$IGNORE_ERRORS" --ignore=modules,dbus,gtk "$@"
-"$PYLINT" --disable="$IGNORE_PYRIGHT,$IGNORE_ALWAYS,$IGNORE_FLAKE8,$IGNORE_GTK_MODULE_ERRORS" "$@/gtk"
-"$PYLINT" --disable="$IGNORE_PYRIGHT,$IGNORE_ALWAYS,$IGNORE_FLAKE8,E0401,C0415" "$@/common/modules"
-"$PYLINT" --disable="$IGNORE_PYRIGHT,$IGNORE_ALWAYS,$IGNORE_FLAKE8," "$@/common/dbus"
+# Ignore but need fixing
# C0103 invalid-name
-# C0209 use-f-string
-# C0301 line-too-long
-# C0302 too-many-lines
-# C0330 bad-continuation
# C0415 import-outside-toplevel
-# E0401 import-error
-# E0611 no-name-in-module
-# R0201 no-self-use
-# R0801 duplicat-code
-# R0901 too-many-ancestors
-# R0904 too-many-public-methods
-# R0913 too-many-arguments
-# R0912 too-many-branches
-# R0914 too-many-locals
-# R0915 too-many-statements
-# R0916 too-many-boolean-expressions
-# R1702 too-many-nested-blocks
# R1710 inconsistent-return-statements
-# R1732 consider-using-with
-# R1725 super-with-arguments
# W0201 attribute-defined-outside-init
# W0221 arguments-differ
-# W0223 abstract-method
-# W0231 super-init-not-called
# W0233 non-parent-init-called
-# W0237 arguments-renamed
-# W0603 global-statement
# W0613 unused-argument
-# W0707 raise-missing-from
-# W1404 implicit-str-concat
-# W1406 redundant-u-string-prefix
+
+NEED_FIXING=C0103,C0415,R1710,W0201,W0221,W0233,W0613
+
+
+"$PYLINT" --version
+"$PYLINT" --disable="$NEED_FIXING" --ignore=modules,dbus "$@"
+"$PYLINT" --disable="C0415" "$@/common/modules"
+"$PYLINT" "$@/common/dbus"
diff --git a/pylintrc b/pylintrc
index 472d2fe78..32061b700 100644
--- a/pylintrc
+++ b/pylintrc
@@ -7,7 +7,7 @@ extension-pkg-whitelist=
# Add files or directories to the blacklist. They should be base names, not
# paths.
-ignore=CVS
+ignore=gui
# Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths.
@@ -50,12 +50,70 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
+#
+# Errors which are covered by pyright
+#
+# E0401 import-error
+# E1101 no-member
+# E1102 not-callable
+# E1111 assignment-from-no-return
+# E1120 no-value-for-parameter
+# E1121 too-many-function-args
+# E1123 unexpected-keyword-arg
+# E1124 redundant-keyword-arg
+# E1125 missing-kwoa
+# E1126 invalid-sequence-index
+# E1127 invalid-slice-index
+# E1128 assignment-from-none
+# E1129 not-context-manager
+# E1130 invalid-unary-operand-type
+# E1131 unsupported-binary-operation
+# E1132 repeated-keyword
+# E1133 not-an-iterable
+# E1134 not-a-mapping
+# E1135 unsupported-membership-test
+# E1136 unsubscriptable-object
+# E1137 unsupported-assignment-operation
+# E1138 unsupported-delete-operation
+# E1139 invalid-metaclass
+# E1140 unhashable-dict-key
+# E1141 dict-iter-missing-items
+# E1142 await-outside-async
+# I1101 c-extension-no-member
+# W0212 protected-access
+# W1113 keyword-arg-before-vararg
+# W1114 arguments-out-of-order
+# W1115 non-str-assignment-to-dunder-name
+# W1116 isinstance-second-argument-not-valid-type
+#
+# Errors which are covered by flake8
+#
+# C0301 line-too-long
+# C0303 trailing-whitespace
+# C0304 missing-final-newline
+# C0321 multiple-statements
+# W0301 unnecessary-semicolon
+# W0311 bad-indentation
+# W0611 unused-import
+#
+# Ignore Always, we don’t need these checks
#
-# Most errors here are disabled because they are covered by pyright
# C0111 missing-docstring
+# C0209 use-f-string
+# C0302 too-many-lines
+# R0801 duplicat-code
+# R0904 too-many-public-methods
+# R0913 too-many-arguments
+# R0915 too-many-statements
+# R1725 super-with-arguments
+# R1732 consider-using-with
+# W0237 arguments-renamed
# W0511 fix-me
-#
-disable=C0111,W0511,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1140,E1141,E1142,I1101,W0212,W1113,W1114,W1115,W1116
+# W0707 raise-missing-from
+# W1404 implicit-str-concat
+# W1406 redundant-u-string-prefix
+
+disable=E0401,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1140,E1141,E1142,I1101,W0212,W1113,W1114,W1115,W1116,C0301,C0303,C0304,C0321,W0301,W0311,W0611,C0111,C0209,C0302,R0801,R0904,R0913,R0915,R1725,R1732,W0237,W0311,W0511,W0707,W1404,W1406
# 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
@@ -149,7 +207,7 @@ ignored-classes=optparse.Values,thread._local,_thread._local,gi.repository.GLib.
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
-ignored-modules=gi.repository,gajim.gui,cairo
+ignored-modules=gi.repository,cairo
# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
@@ -230,12 +288,6 @@ max-line-length=80
# Maximum number of lines in a module
max-module-lines=3000
-# List of optional constructs for which whitespace checking is disabled. `dict-
-# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
-# `trailing-comma` allows a space between comma and closing bracket: (a, ).
-# `empty-line` allows space-only lines.
-no-space-check=trailing-comma,dict-separator
-
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
@@ -243,36 +295,21 @@ single-line-if-stmt=no
[BASIC]
-# Naming hint for argument names
-argument-name-hint=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
-
# Regular expression matching correct argument names
argument-rgx=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
-# Naming hint for attribute names
-attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
-
# Regular expression matching correct attribute names
attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata
-# Naming hint for class attribute names
-class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
-
# Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
-# Naming hint for class names
-class-name-hint=[A-Z_][a-zA-Z0-9]+$
-
# Regular expression matching correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$
-# Naming hint for constant names
-const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
-
# Regular expression matching correct constant names
const-rgx=
@@ -280,9 +317,6 @@ const-rgx=
# ones are exempt.
docstring-min-length=-1
-# Naming hint for function names
-function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
-
# Regular expression matching correct function names
function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
@@ -292,21 +326,12 @@ good-names=i,j,k,ex,Run,_,iq
# Include a hint for the correct naming format with invalid-name
include-naming-hint=no
-# Naming hint for inline iteration names
-inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
-
# Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
-# Naming hint for method names
-method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
-
# Regular expression matching correct method names
method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
-# Naming hint for module names
-module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
-
# Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
@@ -322,9 +347,6 @@ no-docstring-rgx=^_
# to this list to register other decorators that produce valid properties.
property-classes=abc.abstractproperty
-# Naming hint for variable names
-variable-name-hint=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
-
# Regular expression matching correct variable names
variable-rgx=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$