From 49930a0846c86989823b594b50a6e981a3a068c4 Mon Sep 17 00:00:00 2001 From: DMarinhoCodacy Date: Mon, 13 Apr 2026 12:23:33 +0100 Subject: [PATCH 1/2] Update Pylint 4.0.5 --- .gitignore | 4 + Dockerfile | 2 +- docs/description/E1145.md | 5 + docs/description/R0133.md | 2 +- docs/description/R1705.md | 6 +- docs/description/R1720.md | 6 +- docs/description/W0136.md | 5 + docs/description/W0137.md | 5 + docs/description/W1514.md | 3 +- docs/description/description.json | 1530 +++++++++++++++-------------- docs/patterns.json | 800 +++++++-------- requirements.txt | 10 +- 12 files changed, 1210 insertions(+), 1168 deletions(-) create mode 100644 docs/description/E1145.md create mode 100644 docs/description/W0136.md create mode 100644 docs/description/W0137.md diff --git a/.gitignore b/.gitignore index 32cd470..0276307 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,7 @@ __pycache__ #Ignore vscode AI rules .github/copilot-instructions.md + + +#Ignore vscode AI rules +.github/instructions/codacy.instructions.md diff --git a/Dockerfile b/Dockerfile index c94d9e9..5b8059a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.13-alpine3.22 +FROM python:3.14-alpine3.23 COPY requirements.txt ./ RUN pip3 install --no-cache-dir -r requirements.txt COPY docs /docs diff --git a/docs/description/E1145.md b/docs/description/E1145.md new file mode 100644 index 0000000..0359a6b --- /dev/null +++ b/docs/description/E1145.md @@ -0,0 +1,5 @@ +# Async Context Manager With Regular With (E1145) + +Context manager '%s' is async and should be used with 'async with'. Used +when an async context manager is used with a regular 'with' statement +instead of 'async with'. diff --git a/docs/description/R0133.md b/docs/description/R0133.md index 3e346b1..496b19d 100644 --- a/docs/description/R0133.md +++ b/docs/description/R0133.md @@ -1,6 +1,6 @@ # Comparison Of Constants (R0133) -Comparison between constants: '%s %s %s' has a constant value When two +Comparison between constants: "%s %s %s" has a constant value When two literals are compared with each other the result is a constant. Using the constant directly is both easier to read and more performant. Initializing 'True' and 'False' this way is not required since Python diff --git a/docs/description/R1705.md b/docs/description/R1705.md index 29a1490..35156e4 100644 --- a/docs/description/R1705.md +++ b/docs/description/R1705.md @@ -1,6 +1,6 @@ # No Else Return (R1705) Unnecessary "%s" after "return", %s Used in order to highlight an -unnecessary block of code following an if containing a return statement. -As such, it will warn when it encounters an else following a chain of -ifs, all of them containing a return statement. +unnecessary block of code following an if, or a try/except containing a +return statement. As such, it will warn when it encounters an else +following a chain of ifs, all of them containing a return statement. diff --git a/docs/description/R1720.md b/docs/description/R1720.md index 9af508c..5591b82 100644 --- a/docs/description/R1720.md +++ b/docs/description/R1720.md @@ -1,6 +1,6 @@ # No Else Raise (R1720) Unnecessary "%s" after "raise", %s Used in order to highlight an -unnecessary block of code following an if containing a raise statement. -As such, it will warn when it encounters an else following a chain of -ifs, all of them containing a raise statement. +unnecessary block of code following an if, or a try/except containing a +raise statement. As such, it will warn when it encounters an else +following a chain of ifs, all of them containing a raise statement. diff --git a/docs/description/W0136.md b/docs/description/W0136.md new file mode 100644 index 0000000..7beffad --- /dev/null +++ b/docs/description/W0136.md @@ -0,0 +1,5 @@ +# Continue In Finally (W0136) + +'continue' discouraged inside 'finally' clause Emitted when the continue +keyword is found inside a finally clause. This will raise a +SyntaxWarning starting in Python 3.14. diff --git a/docs/description/W0137.md b/docs/description/W0137.md new file mode 100644 index 0000000..2eb96c7 --- /dev/null +++ b/docs/description/W0137.md @@ -0,0 +1,5 @@ +# Break In Finally (W0137) + +'break' discouraged inside 'finally' clause Emitted when the break +keyword is found inside a finally clause. This will raise a +SyntaxWarning starting in Python 3.14. diff --git a/docs/description/W1514.md b/docs/description/W1514.md index cfcf0f1..02b0691 100644 --- a/docs/description/W1514.md +++ b/docs/description/W1514.md @@ -3,4 +3,5 @@ Using open without explicitly specifying an encoding It is better to specify an encoding when opening documents. Using the system default implicitly can create problems on other operating systems. See -https://peps.python.org/pep-0597/ +https://peps.python.org/pep-0597/ This message can't be emitted when +using Python \>= 3.15. diff --git a/docs/description/description.json b/docs/description/description.json index f574b7d..58a2a48 100644 --- a/docs/description/description.json +++ b/docs/description/description.json @@ -1,33 +1,8 @@ [ { - "patternId": "E0103", - "title": "not-in-loop (E0103)", - "description": "%r not properly in loop Used when break or continue keywords are used outside a loop." - }, - { - "patternId": "E0102", - "title": "function-redefined (E0102)", - "description": "%s already defined line %s Used when a function / class / method is redefined." - }, - { - "patternId": "E0116", - "title": "continue-in-finally (E0116)", - "description": "'continue' not supported inside 'finally' clause Emitted when the continue keyword is found inside a finally clause, which is a SyntaxError." - }, - { - "patternId": "E0110", - "title": "abstract-class-instantiated (E0110)", - "description": "Abstract class %r with abstract methods instantiated Used when an abstract class with abc.ABCMeta as metaclass has abstract methods and is instantiated." - }, - { - "patternId": "E0114", - "title": "star-needs-assignment-target (E0114)", - "description": "Can use starred expression only in assignment target Emitted when a star expression is not used in an assignment target." - }, - { - "patternId": "E0108", - "title": "duplicate-argument-name (E0108)", - "description": "Duplicate argument name %r in function definition Duplicate argument names in function definitions are syntax errors." + "patternId": "E0100", + "title": "init-is-generator (E0100)", + "description": "__init__ method is a generator Used when the special class method __init__ is turned into a generator by a yield in its body." }, { "patternId": "E0101", @@ -35,34 +10,44 @@ "description": "Explicit return in __init__ Used when the special class method __init__ has an explicit return value." }, { - "patternId": "E0112", - "title": "too-many-star-expressions (E0112)", - "description": "More than one starred expression in assignment Emitted when there are more than one starred expressions (*x) in an assignment. This is a SyntaxError." - }, - { - "patternId": "E0115", - "title": "nonlocal-and-global (E0115)", - "description": "Name %r is nonlocal and global Emitted when a name is both nonlocal and global." + "patternId": "E0102", + "title": "function-redefined (E0102)", + "description": "%s already defined line %s Used when a function / class / method is redefined." }, { - "patternId": "E0118", - "title": "used-prior-global-declaration (E0118)", - "description": "Name %r is used prior to global declaration Emitted when a name is used prior a global declaration, which results in an error since Python 3.6. This message can't be emitted when using Python < 3.6." + "patternId": "E0103", + "title": "not-in-loop (E0103)", + "description": "%r not properly in loop Used when break or continue keywords are used outside a loop." }, { "patternId": "E0104", "title": "return-outside-function (E0104)", "description": "Return outside function Used when a \"return\" statement is found outside a function or method." }, + { + "patternId": "E0105", + "title": "yield-outside-function (E0105)", + "description": "Yield outside function Used when a \"yield\" statement is found outside a function or method." + }, { "patternId": "E0106", "title": "return-arg-in-generator (E0106)", "description": "Return with argument inside generator Used when a \"return\" statement with an argument is found in a generator function or method (e.g. with some \"yield\" statements). This message can't be emitted when using Python >= 3.3." }, { - "patternId": "E0113", - "title": "invalid-star-assignment-target (E0113)", - "description": "Starred assignment target must be in a list or tuple Emitted when a star expression is used as a starred assignment target." + "patternId": "E0107", + "title": "nonexistent-operator (E0107)", + "description": "Use of the non-existent %s operator Used when you attempt to use the C-style pre-increment or pre-decrement operator -- and ++, which doesn't exist in Python." + }, + { + "patternId": "E0108", + "title": "duplicate-argument-name (E0108)", + "description": "Duplicate argument name %r in function definition Duplicate argument names in function definitions are syntax errors." + }, + { + "patternId": "E0110", + "title": "abstract-class-instantiated (E0110)", + "description": "Abstract class %r with abstract methods instantiated Used when an abstract class with abc.ABCMeta as metaclass has abstract methods and is instantiated." }, { "patternId": "E0111", @@ -70,24 +55,24 @@ "description": "The first reversed() argument is not a sequence Used when the first argument to reversed() builtin isn't a sequence (does not implement __reversed__, nor __getitem__ and __len__" }, { - "patternId": "E0107", - "title": "nonexistent-operator (E0107)", - "description": "Use of the non-existent %s operator Used when you attempt to use the C-style pre-increment or pre-decrement operator -- and ++, which doesn't exist in Python." + "patternId": "E0112", + "title": "too-many-star-expressions (E0112)", + "description": "More than one starred expression in assignment Emitted when there are more than one starred expressions (*x) in an assignment. This is a SyntaxError." }, { - "patternId": "E0105", - "title": "yield-outside-function (E0105)", - "description": "Yield outside function Used when a \"yield\" statement is found outside a function or method." + "patternId": "E0113", + "title": "invalid-star-assignment-target (E0113)", + "description": "Starred assignment target must be in a list or tuple Emitted when a star expression is used as a starred assignment target." }, { - "patternId": "E0100", - "title": "init-is-generator (E0100)", - "description": "__init__ method is a generator Used when the special class method __init__ is turned into a generator by a yield in its body." + "patternId": "E0114", + "title": "star-needs-assignment-target (E0114)", + "description": "Can use starred expression only in assignment target Emitted when a star expression is not used in an assignment target." }, { - "patternId": "E0119", - "title": "misplaced-format-function (E0119)", - "description": "format function is not called on str Emitted when format function is not called on str object. e.g doing print(\"value: {}\").format(123) instead of print(\"value: {}\".format(123)). This might not be what the user intended to do." + "patternId": "E0115", + "title": "nonlocal-and-global (E0115)", + "description": "Name %r is nonlocal and global Emitted when a name is both nonlocal and global." }, { "patternId": "E0117", @@ -95,69 +80,69 @@ "description": "nonlocal name %s found without binding Emitted when a nonlocal variable does not have an attached name somewhere in the parent scopes" }, { - "patternId": "W0150", - "title": "lost-exception (W0150)", - "description": "%s statement in finally block may swallow exception Used when a break or a return statement is found inside the finally clause of a try...finally block: the exceptions raised in the try clause will be silently swallowed instead of being re-raised." + "patternId": "E0118", + "title": "used-prior-global-declaration (E0118)", + "description": "Name %r is used prior to global declaration Emitted when a name is used prior a global declaration, which results in an error since Python 3.6. This message can't be emitted when using Python < 3.6." }, { - "patternId": "W0134", - "title": "return-in-finally (W0134)", - "description": "'return' shadowed by the 'finally' clause. Emitted when a 'return' statement is found in a 'finally' block. This will overwrite the return value of a function and should be avoided." + "patternId": "E0119", + "title": "misplaced-format-function (E0119)", + "description": "format function is not called on str Emitted when format function is not called on str object. e.g doing print(\"value: {}\").format(123) instead of print(\"value: {}\".format(123)). This might not be what the user intended to do." }, { - "patternId": "W0199", - "title": "assert-on-tuple (W0199)", - "description": "Assert called on a populated tuple. Did you mean 'assert x,y'? A call of assert on a tuple will always evaluate to true if the tuple is not empty, and will always evaluate to false if it is." + "patternId": "W0101", + "title": "unreachable (W0101)", + "description": "Unreachable code Used when there is some code behind a \"return\" or \"raise\" statement, which will never be accessed." }, { - "patternId": "W0129", - "title": "assert-on-string-literal (W0129)", - "description": "Assert statement has a string literal as its first argument. The assert will %s fail. Used when an assert statement has a string literal as its first argument, which will cause the assert to always pass." + "patternId": "W0102", + "title": "dangerous-default-value (W0102)", + "description": "Dangerous default value %s as argument Used when a mutable value as list or dictionary is detected in a default value for an argument." }, { - "patternId": "W0127", - "title": "self-assigning-variable (W0127)", - "description": "Assigning the same variable %r to itself Emitted when we detect that a variable is assigned to itself" + "patternId": "W0104", + "title": "pointless-statement (W0104)", + "description": "Statement seems to have no effect Used when a statement doesn't have (or at least seems to) any effect." }, { - "patternId": "W0143", - "title": "comparison-with-callable (W0143)", - "description": "Comparing against a callable, did you omit the parenthesis? This message is emitted when pylint detects that a comparison with a callable was made, which might suggest that some parenthesis were omitted, resulting in potential unwanted behaviour." + "patternId": "W0105", + "title": "pointless-string-statement (W0105)", + "description": "String statement has no effect Used when a string is used as a statement (which of course has no effect). This is a particular case of W0104 with its own message so you can easily disable it if you're using those strings as documentation, instead of comments." }, { - "patternId": "W0177", - "title": "nan-comparison (W0177)", - "description": "Comparison %s should be %s Used when an expression is compared to NaN values like numpy.NaN and float('nan')." + "patternId": "W0106", + "title": "expression-not-assigned (W0106)", + "description": "Expression \"%s\" is assigned to nothing Used when an expression that is not a function call is assigned to nothing. Probably something else was intended." }, { - "patternId": "W0102", - "title": "dangerous-default-value (W0102)", - "description": "Dangerous default value %s as argument Used when a mutable value as list or dictionary is detected in a default value for an argument." + "patternId": "W0107", + "title": "unnecessary-pass (W0107)", + "description": "Unnecessary pass statement Used when a \"pass\" statement can be removed without affecting the behaviour of the code." + }, + { + "patternId": "W0108", + "title": "unnecessary-lambda (W0108)", + "description": "Lambda may not be necessary Used when the body of a lambda expression is a function call on the same argument list as the lambda itself; such lambda expressions are in all but a few cases replaceable with the function being called in the body of the lambda." }, { "patternId": "W0109", "title": "duplicate-key (W0109)", "description": "Duplicate key %r in dictionary Used when a dictionary expression binds the same key multiple times." }, - { - "patternId": "W0130", - "title": "duplicate-value (W0130)", - "description": "Duplicate value %r in set This message is emitted when a set contains the same value two or more times." - }, { "patternId": "W0120", "title": "useless-else-on-loop (W0120)", "description": "Else clause on loop without a break statement, remove the else and de-indent all the code inside it Loops should only have an else clause if they can exit early with a break statement, otherwise the statements under else should be on the same scope as the loop itself." }, { - "patternId": "W0133", - "title": "pointless-exception-statement (W0133)", - "description": "Exception statement has no effect Used when an exception is created without being assigned, raised or returned for subsequent use elsewhere." + "patternId": "W0122", + "title": "exec-used (W0122)", + "description": "Use of exec Raised when the 'exec' statement is used. It's dangerous to use this function for a user input, and it's also slower than actual code in general. This doesn't mean you should never use it, but you should consider alternatives first and restrict the functions available." }, { - "patternId": "W0106", - "title": "expression-not-assigned (W0106)", - "description": "Expression \"%s\" is assigned to nothing Used when an expression that is not a function call is assigned to nothing. Probably something else was intended." + "patternId": "W0123", + "title": "eval-used (W0123)", + "description": "Use of eval Used when you use the \"eval\" function, to discourage its usage. Consider using ast.literal_eval for safely evaluating strings containing Python expressions from untrusted sources." }, { "patternId": "W0124", @@ -165,14 +150,19 @@ "description": "Following \"as\" with another context manager looks like a tuple. Emitted when a with statement component returns multiple values and uses name binding with as only for a part of those values, as in with ctx() as a, b. This can be misleading, since it's not clear if the context manager returns a tuple or if the node without a name binding is another context manager." }, { - "patternId": "W0108", - "title": "unnecessary-lambda (W0108)", - "description": "Lambda may not be necessary Used when the body of a lambda expression is a function call on the same argument list as the lambda itself; such lambda expressions are in all but a few cases replaceable with the function being called in the body of the lambda." + "patternId": "W0125", + "title": "using-constant-test (W0125)", + "description": "Using a conditional statement with a constant value Emitted when a conditional statement (If or ternary if) uses a constant value for its test. This might not be what the user intended to do." }, { - "patternId": "W0131", - "title": "named-expr-without-context (W0131)", - "description": "Named expression used without context Emitted if named expression is used to do a regular assignment outside a context like if, for, while, or a comprehension." + "patternId": "W0126", + "title": "missing-parentheses-for-call-in-test (W0126)", + "description": "Using a conditional statement with potentially wrong function or method call due to missing parentheses Emitted when a conditional statement (If or ternary if) seems to wrongly call a function due to missing parentheses" + }, + { + "patternId": "W0127", + "title": "self-assigning-variable (W0127)", + "description": "Assigning the same variable %r to itself Emitted when we detect that a variable is assigned to itself" }, { "patternId": "W0128", @@ -180,14 +170,29 @@ "description": "Redeclared variable %r in assignment Emitted when we detect that a variable was redeclared in the same assignment." }, { - "patternId": "W0104", - "title": "pointless-statement (W0104)", - "description": "Statement seems to have no effect Used when a statement doesn't have (or at least seems to) any effect." + "patternId": "W0129", + "title": "assert-on-string-literal (W0129)", + "description": "Assert statement has a string literal as its first argument. The assert will %s fail. Used when an assert statement has a string literal as its first argument, which will cause the assert to always pass." }, { - "patternId": "W0105", - "title": "pointless-string-statement (W0105)", - "description": "String statement has no effect Used when a string is used as a statement (which of course has no effect). This is a particular case of W0104 with its own message so you can easily disable it if you're using those strings as documentation, instead of comments." + "patternId": "W0130", + "title": "duplicate-value (W0130)", + "description": "Duplicate value %r in set This message is emitted when a set contains the same value two or more times." + }, + { + "patternId": "W0131", + "title": "named-expr-without-context (W0131)", + "description": "Named expression used without context Emitted if named expression is used to do a regular assignment outside a context like if, for, while, or a comprehension." + }, + { + "patternId": "W0133", + "title": "pointless-exception-statement (W0133)", + "description": "Exception statement has no effect Used when an exception is created without being assigned, raised or returned for subsequent use elsewhere." + }, + { + "patternId": "W0134", + "title": "return-in-finally (W0134)", + "description": "'return' shadowed by the 'finally' clause. Emitted when a 'return' statement is found in a 'finally' block. This will overwrite the return value of a function and should be avoided." }, { "patternId": "W0135", @@ -195,39 +200,34 @@ "description": "The context used in function %r will not be exited. Used when a contextmanager is used inside a generator function and the cleanup is not handled." }, { - "patternId": "W0107", - "title": "unnecessary-pass (W0107)", - "description": "Unnecessary pass statement Used when a \"pass\" statement can be removed without affecting the behaviour of the code." - }, - { - "patternId": "W0101", - "title": "unreachable (W0101)", - "description": "Unreachable code Used when there is some code behind a \"return\" or \"raise\" statement, which will never be accessed." + "patternId": "W0136", + "title": "continue-in-finally (W0136)", + "description": "'continue' discouraged inside 'finally' clause Emitted when the continue keyword is found inside a finally clause. This will raise a SyntaxWarning starting in Python 3.14." }, { - "patternId": "W0123", - "title": "eval-used (W0123)", - "description": "Use of eval Used when you use the \"eval\" function, to discourage its usage. Consider using ast.literal_eval for safely evaluating strings containing Python expressions from untrusted sources." + "patternId": "W0137", + "title": "break-in-finally (W0137)", + "description": "'break' discouraged inside 'finally' clause Emitted when the break keyword is found inside a finally clause. This will raise a SyntaxWarning starting in Python 3.14." }, { - "patternId": "W0122", - "title": "exec-used (W0122)", - "description": "Use of exec Raised when the 'exec' statement is used. It's dangerous to use this function for a user input, and it's also slower than actual code in general. This doesn't mean you should never use it, but you should consider alternatives first and restrict the functions available." + "patternId": "W0143", + "title": "comparison-with-callable (W0143)", + "description": "Comparing against a callable, did you omit the parenthesis? This message is emitted when pylint detects that a comparison with a callable was made, which might suggest that some parenthesis were omitted, resulting in potential unwanted behaviour." }, { - "patternId": "W0125", - "title": "using-constant-test (W0125)", - "description": "Using a conditional statement with a constant value Emitted when a conditional statement (If or ternary if) uses a constant value for its test. This might not be what the user intended to do." + "patternId": "W0150", + "title": "lost-exception (W0150)", + "description": "%s statement in finally block may swallow exception Used when a break or a return statement is found inside the finally clause of a try...finally block: the exceptions raised in the try clause will be silently swallowed instead of being re-raised." }, { - "patternId": "W0126", - "title": "missing-parentheses-for-call-in-test (W0126)", - "description": "Using a conditional statement with potentially wrong function or method call due to missing parentheses Emitted when a conditional statement (If or ternary if) seems to wrongly call a function due to missing parentheses" + "patternId": "W0177", + "title": "nan-comparison (W0177)", + "description": "Comparison %s should be %s Used when an expression is compared to NaN values like numpy.NaN and float('nan')." }, { - "patternId": "R0133", - "title": "comparison-of-constants (R0133)", - "description": "Comparison between constants: '%s %s %s' has a constant value When two literals are compared with each other the result is a constant. Using the constant directly is both easier to read and more performant. Initializing 'True' and 'False' this way is not required since Python 2.3." + "patternId": "W0199", + "title": "assert-on-tuple (W0199)", + "description": "Assert called on a populated tuple. Did you mean 'assert x,y'? A call of assert on a tuple will always evaluate to true if the tuple is not empty, and will always evaluate to false if it is." }, { "patternId": "R0123", @@ -239,6 +239,11 @@ "title": "comparison-with-itself (R0124)", "description": "Redundant comparison - %s Used when something is compared against itself." }, + { + "patternId": "R0133", + "title": "comparison-of-constants (R0133)", + "description": "Comparison between constants: \"%s %s %s\" has a constant value When two literals are compared with each other the result is a constant. Using the constant directly is both easier to read and more performant. Initializing 'True' and 'False' this way is not required since Python 2.3." + }, { "patternId": "C0103", "title": "invalid-name (C0103)", @@ -286,40 +291,45 @@ } ] }, - { - "patternId": "C0121", - "title": "singleton-comparison (C0121)", - "description": "Comparison %s should be %s Used when an expression is compared to singleton values like True, False or None." - }, { "patternId": "C0104", "title": "disallowed-name (C0104)", "description": "Disallowed name \"%s\" Used when the name matches bad-names or bad-names-rgxs- (unauthorized names)." }, + { + "patternId": "C0105", + "title": "typevar-name-incorrect-variance (C0105)", + "description": "Type variable name does not reflect variance%s Emitted when a TypeVar name doesn't reflect its type variance. According to PEP8, it is recommended to add suffixes '_co' and '_contra' to the variables used to declare covariant or contravariant behaviour respectively. Invariant (default) variables do not require a suffix. The message is also emitted when invariant variables do have a suffix." + }, { "patternId": "C0112", "title": "empty-docstring (C0112)", "description": "Empty %s docstring Used when a module, function, class or method has an empty docstring (it would be too easy ;)." }, { - "patternId": "C0115", - "title": "missing-class-docstring (C0115)", - "description": "Missing class docstring Used when a class has no docstring. Even an empty class must have a docstring." - }, + "patternId": "C0114", + "title": "missing-module-docstring (C0114)", + "description": "Missing module docstring Used when a module has no docstring. Empty modules do not require a docstring." + }, + { + "patternId": "C0115", + "title": "missing-class-docstring (C0115)", + "description": "Missing class docstring Used when a class has no docstring. Even an empty class must have a docstring." + }, { "patternId": "C0116", "title": "missing-function-docstring (C0116)", "description": "Missing function or method docstring Used when a function or method has no docstring. Some special methods like __init__ do not require a docstring." }, { - "patternId": "C0114", - "title": "missing-module-docstring (C0114)", - "description": "Missing module docstring Used when a module has no docstring. Empty modules do not require a docstring." + "patternId": "C0121", + "title": "singleton-comparison (C0121)", + "description": "Comparison %s should be %s Used when an expression is compared to singleton values like True, False or None." }, { - "patternId": "C0105", - "title": "typevar-name-incorrect-variance (C0105)", - "description": "Type variable name does not reflect variance%s Emitted when a TypeVar name doesn't reflect its type variance. According to PEP8, it is recommended to add suffixes '_co' and '_contra' to the variables used to declare covariant or contravariant behaviour respectively. Invariant (default) variables do not require a suffix. The message is also emitted when invariant variables do have a suffix." + "patternId": "C0123", + "title": "unidiomatic-typecheck (C0123)", + "description": "Use isinstance() rather than type() for a typecheck. The idiomatic way to perform an explicit typecheck in Python is to use isinstance(x, Y) rather than type(x) == Y, type(x) is Y. Though there are unusual situations where these give different results." }, { "patternId": "C0131", @@ -332,9 +342,9 @@ "description": "TypeVar name \"%s\" does not match assigned variable name \"%s\" Emitted when a TypeVar is assigned to a variable that does not match its name argument." }, { - "patternId": "C0123", - "title": "unidiomatic-typecheck (C0123)", - "description": "Use isinstance() rather than type() for a typecheck. The idiomatic way to perform an explicit typecheck in Python is to use isinstance(x, Y) rather than type(x) == Y, type(x) is Y. Though there are unusual situations where these give different results." + "patternId": "E0202", + "title": "method-hidden (E0202)", + "description": "An attribute defined in %s line %s hides this method Used when a class defines a method which is hidden by an instance attribute from an ancestor class or set by some client code." }, { "patternId": "E0203", @@ -342,9 +352,19 @@ "description": "Access to member %r before its definition line %s Used when an instance member is accessed before it's actually assigned." }, { - "patternId": "E0202", - "title": "method-hidden (E0202)", - "description": "An attribute defined in %s line %s hides this method Used when a class defines a method which is hidden by an instance attribute from an ancestor class or set by some client code." + "patternId": "E0211", + "title": "no-method-argument (E0211)", + "description": "Method %r has no argument Used when a method which should have the bound instance as first argument has no argument defined." + }, + { + "patternId": "E0213", + "title": "no-self-argument (E0213)", + "description": "Method %r should have \"self\" as first argument Used when a method has an attribute different the \"self\" as first argument. This is considered as an error since this is a so common convention that you shouldn't break it!" + }, + { + "patternId": "E0236", + "title": "invalid-slots-object (E0236)", + "description": "Invalid object %r in __slots__, must contain only non empty strings Used when an invalid (non-string) object occurs in __slots__." }, { "patternId": "E0237", @@ -352,14 +372,14 @@ "description": "Assigning to attribute %r not defined in class slots Used when assigning to an attribute not defined in the class slots." }, { - "patternId": "E0241", - "title": "duplicate-bases (E0241)", - "description": "Duplicate bases for class %r Duplicate use of base classes in derived classes raise TypeErrors." + "patternId": "E0238", + "title": "invalid-slots (E0238)", + "description": "Invalid __slots__ object Used when an invalid __slots__ is found in class. Only a string, an iterable or a sequence is permitted." }, { - "patternId": "E0244", - "title": "invalid-enum-extension (E0244)", - "description": "Extending inherited Enum class \"%s\" Used when a class tries to extend an inherited Enum class. Doing so will raise a TypeError at runtime." + "patternId": "E0239", + "title": "inherit-non-class (E0239)", + "description": "Inheriting %r, which is not a class. Used when a class inherits from something which is not a class." }, { "patternId": "E0240", @@ -367,14 +387,14 @@ "description": "Inconsistent method resolution order for class %r Used when a class has an inconsistent method resolution order." }, { - "patternId": "E0239", - "title": "inherit-non-class (E0239)", - "description": "Inheriting %r, which is not a class. Used when a class inherits from something which is not a class." + "patternId": "E0241", + "title": "duplicate-bases (E0241)", + "description": "Duplicate bases for class %r Duplicate use of base classes in derived classes raise TypeErrors." }, { - "patternId": "E0238", - "title": "invalid-slots (E0238)", - "description": "Invalid __slots__ object Used when an invalid __slots__ is found in class. Only a string, an iterable or a sequence is permitted." + "patternId": "E0242", + "title": "class-variable-slots-conflict (E0242)", + "description": "Value %r in slots conflicts with class variable Used when a value in __slots__ conflicts with a class variable, property or method." }, { "patternId": "E0243", @@ -382,45 +402,65 @@ "description": "Invalid assignment to '__class__'. Should be a class definition but got a '%s' Used when an invalid object is assigned to a __class__ property. Only a class is permitted." }, { - "patternId": "E0236", - "title": "invalid-slots-object (E0236)", - "description": "Invalid object %r in __slots__, must contain only non empty strings Used when an invalid (non-string) object occurs in __slots__." - }, - { - "patternId": "E0211", - "title": "no-method-argument (E0211)", - "description": "Method %r has no argument Used when a method which should have the bound instance as first argument has no argument defined." - }, - { - "patternId": "E0213", - "title": "no-self-argument (E0213)", - "description": "Method %r should have \"self\" as first argument Used when a method has an attribute different the \"self\" as first argument. This is considered as an error since this is a so common convention that you shouldn't break it!" + "patternId": "E0244", + "title": "invalid-enum-extension (E0244)", + "description": "Extending inherited Enum class \"%s\" Used when a class tries to extend an inherited Enum class. Doing so will raise a TypeError at runtime." }, { "patternId": "E0245", "title": "declare-non-slot (E0245)", "description": "No such name %r in __slots__ Raised when a type annotation on a class is absent from the list of names in __slots__, and __slots__ does not contain a __dict__ entry." }, + { + "patternId": "E0301", + "title": "non-iterator-returned (E0301)", + "description": "__iter__ returns non-iterator Used when an __iter__ method returns something which is not an iterable (i.e. has no __next__ method)" + }, { "patternId": "E0302", "title": "unexpected-special-method-signature (E0302)", "description": "The special method %r expects %s param(s), %d %s given Emitted when a special method was defined with an invalid number of parameters. If it has too few or too many, it might not work at all." }, { - "patternId": "E0242", - "title": "class-variable-slots-conflict (E0242)", - "description": "Value %r in slots conflicts with class variable Used when a value in __slots__ conflicts with a class variable, property or method." + "patternId": "E0303", + "title": "invalid-length-returned (E0303)", + "description": "__len__ does not return non-negative integer Used when a __len__ method returns something which is not a non-negative integer" }, { "patternId": "E0304", "title": "invalid-bool-returned (E0304)", "description": "__bool__ does not return bool Used when a __bool__ method returns something which is not a bool" }, + { + "patternId": "E0305", + "title": "invalid-index-returned (E0305)", + "description": "__index__ does not return int Used when an __index__ method returns something which is not an integer" + }, + { + "patternId": "E0306", + "title": "invalid-repr-returned (E0306)", + "description": "__repr__ does not return str Used when a __repr__ method returns something which is not a string" + }, + { + "patternId": "E0307", + "title": "invalid-str-returned (E0307)", + "description": "__str__ does not return str Used when a __str__ method returns something which is not a string" + }, { "patternId": "E0308", "title": "invalid-bytes-returned (E0308)", "description": "__bytes__ does not return bytes Used when a __bytes__ method returns something which is not bytes" }, + { + "patternId": "E0309", + "title": "invalid-hash-returned (E0309)", + "description": "__hash__ does not return int Used when a __hash__ method returns something which is not an integer" + }, + { + "patternId": "E0310", + "title": "invalid-length-hint-returned (E0310)", + "description": "__length_hint__ does not return non-negative integer Used when a __length_hint__ method returns something which is not a non- negative integer" + }, { "patternId": "E0311", "title": "invalid-format-returned (E0311)", @@ -437,39 +477,24 @@ "description": "__getnewargs_ex__ does not return a tuple containing (tuple, dict) Used when a __getnewargs_ex__ method returns something which is not of the form tuple(tuple, dict)" }, { - "patternId": "E0309", - "title": "invalid-hash-returned (E0309)", - "description": "__hash__ does not return int Used when a __hash__ method returns something which is not an integer" - }, - { - "patternId": "E0305", - "title": "invalid-index-returned (E0305)", - "description": "__index__ does not return int Used when an __index__ method returns something which is not an integer" - }, - { - "patternId": "E0301", - "title": "non-iterator-returned (E0301)", - "description": "__iter__ returns non-iterator Used when an __iter__ method returns something which is not an iterable (i.e. has no __next__ method)" - }, - { - "patternId": "E0303", - "title": "invalid-length-returned (E0303)", - "description": "__len__ does not return non-negative integer Used when a __len__ method returns something which is not a non-negative integer" + "patternId": "W0201", + "title": "attribute-defined-outside-init (W0201)", + "description": "Attribute %r defined outside __init__ Used when an instance attribute is defined outside the __init__ method." }, { - "patternId": "E0310", - "title": "invalid-length-hint-returned (E0310)", - "description": "__length_hint__ does not return non-negative integer Used when a __length_hint__ method returns something which is not a non- negative integer" + "patternId": "W0211", + "title": "bad-staticmethod-argument (W0211)", + "description": "Static method with %r as first argument Used when a static method has \"self\" or a value specified in valid- classmethod-first-arg option or valid-metaclass-classmethod-first-arg option as first argument." }, { - "patternId": "E0306", - "title": "invalid-repr-returned (E0306)", - "description": "__repr__ does not return str Used when a __repr__ method returns something which is not a string" + "patternId": "W0212", + "title": "protected-access (W0212)", + "description": "Access to a protected member %s of a client class Used when a protected member (i.e. class member with a name beginning with an underscore) is accessed outside the class or a descendant of the class where it's defined." }, { - "patternId": "E0307", - "title": "invalid-str-returned (E0307)", - "description": "__str__ does not return str Used when a __str__ method returns something which is not a string" + "patternId": "W0213", + "title": "implicit-flag-alias (W0213)", + "description": "Flag member %(overlap)s shares bit positions with %(sources)s Used when multiple integer values declared within an enum.IntFlag class share a common bit position." }, { "patternId": "W0221", @@ -477,34 +502,39 @@ "description": "%s %s %r method Used when a method has a different number of arguments than in the implemented interface or in an overridden method. Extra arguments with default values are ignored." }, { - "patternId": "W0237", - "title": "arguments-renamed (W0237)", - "description": "%s %s %r method Used when a method parameter has a different name than in the implemented interface or in an overridden method." + "patternId": "W0222", + "title": "signature-differs (W0222)", + "description": "Signature differs from %s %r method Used when a method signature is different than in the implemented interface or in an overridden method." }, { - "patternId": "W0212", - "title": "protected-access (W0212)", - "description": "Access to a protected member %s of a client class Used when a protected member (i.e. class member with a name beginning with an underscore) is accessed outside the class or a descendant of the class where it's defined." + "patternId": "W0223", + "title": "abstract-method (W0223)", + "description": "Method %r is abstract in class %r but is not overridden in child class %r Used when an abstract method (i.e. raise NotImplementedError) is not overridden in concrete class." }, { - "patternId": "W0201", - "title": "attribute-defined-outside-init (W0201)", - "description": "Attribute %r defined outside __init__ Used when an instance attribute is defined outside the __init__ method." + "patternId": "W0231", + "title": "super-init-not-called (W0231)", + "description": "__init__ method from base class %r is not called Used when an ancestor class method has an __init__ method which is not called by a derived class." }, { - "patternId": "W0240", - "title": "subclassed-final-class (W0240)", - "description": "Class %r is a subclass of a class decorated with typing.final: %r Used when a class decorated with typing.final has been subclassed." + "patternId": "W0233", + "title": "non-parent-init-called (W0233)", + "description": "__init__ method from a non direct base class %r is called Used when an __init__ method is called on a class which is not in the direct ancestors for the analysed class." }, { - "patternId": "W0213", - "title": "implicit-flag-alias (W0213)", - "description": "Flag member %(overlap)s shares bit positions with %(sources)s Used when multiple integer values declared within an enum.IntFlag class share a common bit position." + "patternId": "W0236", + "title": "invalid-overridden-method (W0236)", + "description": "Method %r was expected to be %r, found it instead as %r Used when we detect that a method was overridden in a way that does not match its base class which could result in potential bugs at runtime." }, { - "patternId": "W0223", - "title": "abstract-method (W0223)", - "description": "Method %r is abstract in class %r but is not overridden in child class %r Used when an abstract method (i.e. raise NotImplementedError) is not overridden in concrete class." + "patternId": "W0237", + "title": "arguments-renamed (W0237)", + "description": "%s %s %r method Used when a method parameter has a different name than in the implemented interface or in an overridden method." + }, + { + "patternId": "W0238", + "title": "unused-private-member (W0238)", + "description": "Unused private member `%s.%s` Emitted when a private member of a class is defined but not used." }, { "patternId": "W0239", @@ -512,60 +542,25 @@ "description": "Method %r overrides a method decorated with typing.final which is defined in class %r Used when a method decorated with typing.final has been overridden." }, { - "patternId": "W0236", - "title": "invalid-overridden-method (W0236)", - "description": "Method %r was expected to be %r, found it instead as %r Used when we detect that a method was overridden in a way that does not match its base class which could result in potential bugs at runtime." + "patternId": "W0240", + "title": "subclassed-final-class (W0240)", + "description": "Class %r is a subclass of a class decorated with typing.final: %r Used when a class decorated with typing.final has been subclassed." }, { "patternId": "W0244", "title": "redefined-slots-in-subclass (W0244)", "description": "Redefined slots %r in subclass Used when a slot is re-defined in a subclass." }, - { - "patternId": "W0222", - "title": "signature-differs (W0222)", - "description": "Signature differs from %s %r method Used when a method signature is different than in the implemented interface or in an overridden method." - }, - { - "patternId": "W0211", - "title": "bad-staticmethod-argument (W0211)", - "description": "Static method with %r as first argument Used when a static method has \"self\" or a value specified in valid- classmethod-first-arg option or valid-metaclass-classmethod-first-arg option as first argument." - }, { "patternId": "W0245", "title": "super-without-brackets (W0245)", "description": "Super call without brackets Used when a call to super does not have brackets and thus is not an actual call and does not work as expected." }, - { - "patternId": "W0238", - "title": "unused-private-member (W0238)", - "description": "Unused private member `%s.%s` Emitted when a private member of a class is defined but not used." - }, { "patternId": "W0246", "title": "useless-parent-delegation (W0246)", "description": "Useless parent or super() delegation in method %r Used whenever we can detect that an overridden method is useless, relying on parent or super() delegation to do the same thing as another method from the MRO." }, - { - "patternId": "W0233", - "title": "non-parent-init-called (W0233)", - "description": "__init__ method from a non direct base class %r is called Used when an __init__ method is called on a class which is not in the direct ancestors for the analysed class." - }, - { - "patternId": "W0231", - "title": "super-init-not-called (W0231)", - "description": "__init__ method from base class %r is not called Used when an ancestor class method has an __init__ method which is not called by a derived class." - }, - { - "patternId": "R0206", - "title": "property-with-parameters (R0206)", - "description": "Cannot have defined parameters for properties Used when we detect that a property also has parameters, which are useless, given that properties cannot be called with additional arguments." - }, - { - "patternId": "R0205", - "title": "useless-object-inheritance (R0205)", - "description": "Class %r inherits from object, can be safely removed from bases in python3 Used when a class inherit from object, which under python3 is implicit, hence can be safely removed from bases." - }, { "patternId": "R0202", "title": "no-classmethod-decorator (R0202)", @@ -577,49 +572,64 @@ "description": "Consider using a decorator instead of calling staticmethod Used when a static method is defined without using the decorator syntax." }, { - "patternId": "C0205", - "title": "single-string-used-for-slots (C0205)", - "description": "Class __slots__ should be a non-string iterable Used when a class __slots__ is a simple string, rather than an iterable." + "patternId": "R0205", + "title": "useless-object-inheritance (R0205)", + "description": "Class %r inherits from object, can be safely removed from bases in python3 Used when a class inherit from object, which under python3 is implicit, hence can be safely removed from bases." + }, + { + "patternId": "R0206", + "title": "property-with-parameters (R0206)", + "description": "Cannot have defined parameters for properties Used when we detect that a property also has parameters, which are useless, given that properties cannot be called with additional arguments." }, { "patternId": "C0202", "title": "bad-classmethod-argument (C0202)", "description": "Class method %s should have %s as first argument Used when a class method has a first argument named differently than the value specified in valid-classmethod-first-arg option (default to \"cls\"), recommended to easily differentiate them from regular instance methods." }, - { - "patternId": "C0204", - "title": "bad-mcs-classmethod-argument (C0204)", - "description": "Metaclass class method %s should have %s as first argument Used when a metaclass class method has a first argument named differently than the value specified in valid-metaclass-classmethod-first-arg option (default to \"mcs\"), recommended to easily differentiate them from regular instance methods." - }, { "patternId": "C0203", "title": "bad-mcs-method-argument (C0203)", "description": "Metaclass method %s should have %s as first argument Used when a metaclass method has a first argument named differently than the value specified in valid-classmethod-first-arg option (default to \"cls\"), recommended to easily differentiate them from regular instance methods." }, + { + "patternId": "C0204", + "title": "bad-mcs-classmethod-argument (C0204)", + "description": "Metaclass class method %s should have %s as first argument Used when a metaclass class method has a first argument named differently than the value specified in valid-metaclass-classmethod-first-arg option (default to \"mcs\"), recommended to easily differentiate them from regular instance methods." + }, + { + "patternId": "C0205", + "title": "single-string-used-for-slots (C0205)", + "description": "Class __slots__ should be a non-string iterable Used when a class __slots__ is a simple string, rather than an iterable." + }, { "patternId": "F0202", "title": "method-check-failed (F0202)", "description": "Unable to check methods signature (%s / %s) Used when Pylint has been unable to check methods signature compatibility for an unexpected reason. Please report this kind if you don't make sense of it." }, - { - "patternId": "R0903", - "title": "too-few-public-methods (R0903)", - "description": "Too few public methods (%s/%s) Used when class has too few public methods, so be sure it's really worth it." - }, { "patternId": "R0901", "title": "too-many-ancestors (R0901)", "description": "Too many ancestors (%s/%s) Used when class has too many parent classes, try to reduce this to get a simpler (and so easier to use) class." }, { - "patternId": "R0913", - "title": "too-many-arguments (R0913)", - "description": "Too many arguments (%s/%s) Used when a function or method takes too many arguments." + "patternId": "R0902", + "title": "too-many-instance-attributes (R0902)", + "description": "Too many instance attributes (%s/%s) Used when class has too many instance attributes, try to reduce this to get a simpler (and so easier to use) class." }, { - "patternId": "R0916", - "title": "too-many-boolean-expressions (R0916)", - "description": "Too many boolean expressions in if statement (%s/%s) Used when an if statement contains too many boolean expressions." + "patternId": "R0903", + "title": "too-few-public-methods (R0903)", + "description": "Too few public methods (%s/%s) Used when class has too few public methods, so be sure it's really worth it." + }, + { + "patternId": "R0904", + "title": "too-many-public-methods (R0904)", + "description": "Too many public methods (%s/%s) Used when class has too many public methods, try to reduce this to get a simpler (and so easier to use) class." + }, + { + "patternId": "R0911", + "title": "too-many-return-statements (R0911)", + "description": "Too many return statements (%s/%s) Used when a function or method has too many return statement, making it hard to follow." }, { "patternId": "R0912", @@ -627,9 +637,9 @@ "description": "Too many branches (%s/%s) Used when a function or method has too many branches, making it hard to follow." }, { - "patternId": "R0902", - "title": "too-many-instance-attributes (R0902)", - "description": "Too many instance attributes (%s/%s) Used when class has too many instance attributes, try to reduce this to get a simpler (and so easier to use) class." + "patternId": "R0913", + "title": "too-many-arguments (R0913)", + "description": "Too many arguments (%s/%s) Used when a function or method takes too many arguments." }, { "patternId": "R0914", @@ -643,24 +653,19 @@ ] }, { - "patternId": "R0917", - "title": "too-many-positional-arguments (R0917)", - "description": "Too many positional arguments (%s/%s) Used when a function has too many positional arguments." - }, - { - "patternId": "R0904", - "title": "too-many-public-methods (R0904)", - "description": "Too many public methods (%s/%s) Used when class has too many public methods, try to reduce this to get a simpler (and so easier to use) class." + "patternId": "R0915", + "title": "too-many-statements (R0915)", + "description": "Too many statements (%s/%s) Used when a function or method has too many statements. You should then split it in smaller functions / methods." }, { - "patternId": "R0911", - "title": "too-many-return-statements (R0911)", - "description": "Too many return statements (%s/%s) Used when a function or method has too many return statement, making it hard to follow." + "patternId": "R0916", + "title": "too-many-boolean-expressions (R0916)", + "description": "Too many boolean expressions in if statement (%s/%s) Used when an if statement contains too many boolean expressions." }, { - "patternId": "R0915", - "title": "too-many-statements (R0915)", - "description": "Too many statements (%s/%s) Used when a function or method has too many statements. You should then split it in smaller functions / methods." + "patternId": "R0917", + "title": "too-many-positional-arguments (R0917)", + "description": "Too many positional arguments (%s/%s) Used when a function has too many positional arguments." }, { "patternId": "E0701", @@ -668,34 +673,39 @@ "description": "Bad except clauses order (%s) Used when except clauses are not in the correct order (from the more specific to the more generic). If you don't fix the order, some exceptions may not be caught by the most specific handler." }, { - "patternId": "E0712", - "title": "catching-non-exception (E0712)", - "description": "Catching an exception which doesn't inherit from Exception: %s Used when a class which doesn't inherit from Exception is used as an exception in an except clause." + "patternId": "E0702", + "title": "raising-bad-type (E0702)", + "description": "Raising %s while only classes or instances are allowed Used when something which is neither a class nor an instance is raised (i.e. a TypeError will be raised)." + }, + { + "patternId": "E0704", + "title": "misplaced-bare-raise (E0704)", + "description": "The raise statement is not inside an except clause Used when a bare raise is not used inside an except clause. This generates an error, since there are no active exceptions to be reraised. An exception to this rule is represented by a bare raise inside a finally clause, which might work, as long as an exception is raised inside the try block, but it is nevertheless a code smell that must not be relied upon." }, { "patternId": "E0705", "title": "bad-exception-cause (E0705)", "description": "Exception cause set to something which is not an exception, nor None Used when using the syntax \"raise ... from ...\", where the exception cause is not an exception, nor None." }, + { + "patternId": "E0710", + "title": "raising-non-exception (E0710)", + "description": "Raising a class which doesn't inherit from BaseException Used when a class which doesn't inherit from BaseException is raised." + }, { "patternId": "E0711", "title": "notimplemented-raised (E0711)", "description": "NotImplemented raised - should raise NotImplementedError Used when NotImplemented is raised instead of NotImplementedError" }, { - "patternId": "E0702", - "title": "raising-bad-type (E0702)", - "description": "Raising %s while only classes or instances are allowed Used when something which is neither a class nor an instance is raised (i.e. a TypeError will be raised)." - }, - { - "patternId": "E0710", - "title": "raising-non-exception (E0710)", - "description": "Raising a class which doesn't inherit from BaseException Used when a class which doesn't inherit from BaseException is raised." + "patternId": "E0712", + "title": "catching-non-exception (E0712)", + "description": "Catching an exception which doesn't inherit from Exception: %s Used when a class which doesn't inherit from Exception is used as an exception in an except clause." }, { - "patternId": "E0704", - "title": "misplaced-bare-raise (E0704)", - "description": "The raise statement is not inside an except clause Used when a bare raise is not used inside an except clause. This generates an error, since there are no active exceptions to be reraised. An exception to this rule is represented by a bare raise inside a finally clause, which might work, as long as an exception is raised inside the try block, but it is nevertheless a code smell that must not be relied upon." + "patternId": "W0702", + "title": "bare-except (W0702)", + "description": "No exception type(s) specified A bare except: clause will catch SystemExit and KeyboardInterrupt exceptions, making it harder to interrupt a program with Control-C, and can disguise other problems. If you want to catch all exceptions that signal program errors, use except Exception: (bare except is equivalent to except BaseException:)." }, { "patternId": "W0705", @@ -703,59 +713,49 @@ "description": "Catching previously caught exception type %s Used when an except catches a type that was already caught by a previous handler." }, { - "patternId": "W0718", - "title": "broad-exception-caught (W0718)", - "description": "Catching too general exception %s If you use a naked except Exception: clause, you might end up catching exceptions other than the ones you expect to catch. This can hide bugs or make it harder to debug programs when unrelated errors are hidden." + "patternId": "W0706", + "title": "try-except-raise (W0706)", + "description": "The except handler raises immediately Used when an except handler uses raise as its first or only operator. This is useless because it raises back the exception immediately. Remove the raise operator or the entire try-except-raise block!" }, { "patternId": "W0707", "title": "raise-missing-from (W0707)", "description": "Consider explicitly re-raising using %s'%s from %s' Python's exception chaining shows the traceback of the current exception, but also of the original exception. When you raise a new exception after another exception was caught it's likely that the second exception is a friendly re- wrapping of the first exception. In such cases raise from provides a better link between the two tracebacks in the final error." }, - { - "patternId": "W0715", - "title": "raising-format-tuple (W0715)", - "description": "Exception arguments suggest string formatting might be intended Used when passing multiple arguments to an exception constructor, the first of them a string literal containing what appears to be placeholders intended for formatting" - }, { "patternId": "W0711", "title": "binary-op-exception (W0711)", "description": "Exception to catch is the result of a binary \"%s\" operation Used when the exception to catch is of the form \"except A or B:\". If intending to catch multiple, rewrite as \"except (A, B):\"" }, + { + "patternId": "W0715", + "title": "raising-format-tuple (W0715)", + "description": "Exception arguments suggest string formatting might be intended Used when passing multiple arguments to an exception constructor, the first of them a string literal containing what appears to be placeholders intended for formatting" + }, { "patternId": "W0716", "title": "wrong-exception-operation (W0716)", "description": "Invalid exception operation. %s Used when an operation is done against an exception, but the operation is not valid for the exception in question. Usually emitted when having binary operations between exceptions in except handlers." }, { - "patternId": "W0702", - "title": "bare-except (W0702)", - "description": "No exception type(s) specified A bare except: clause will catch SystemExit and KeyboardInterrupt exceptions, making it harder to interrupt a program with Control-C, and can disguise other problems. If you want to catch all exceptions that signal program errors, use except Exception: (bare except is equivalent to except BaseException:)." + "patternId": "W0718", + "title": "broad-exception-caught (W0718)", + "description": "Catching too general exception %s If you use a naked except Exception: clause, you might end up catching exceptions other than the ones you expect to catch. This can hide bugs or make it harder to debug programs when unrelated errors are hidden." }, { "patternId": "W0719", "title": "broad-exception-raised (W0719)", "description": "Raising too general exception: %s Raising exceptions that are too generic force you to catch exceptions generically too. It will force you to use a naked except Exception: clause. You might then end up catching exceptions other than the ones you expect to catch. This can hide bugs or make it harder to debug programs when unrelated errors are hidden." }, - { - "patternId": "W0706", - "title": "try-except-raise (W0706)", - "description": "The except handler raises immediately Used when an except handler uses raise as its first or only operator. This is useless because it raises back the exception immediately. Remove the raise operator or the entire try-except-raise block!" - }, - { - "patternId": "W0311", - "title": "bad-indentation (W0311)", - "description": "Bad indentation. Found %s %s, expected %s Used when an unexpected number of indentation's tabulations or spaces has been found." - }, { "patternId": "W0301", "title": "unnecessary-semicolon (W0301)", "description": "Unnecessary semicolon Used when a statement is ended by a semi-colon (\";\"), which isn't necessary (that's python, not C ;)." }, { - "patternId": "C0304", - "title": "missing-final-newline (C0304)", - "description": "Final newline missing Used when the last line in a file is missing a newline." + "patternId": "W0311", + "title": "bad-indentation (W0311)", + "description": "Bad indentation. Found %s %s, expected %s Used when an unexpected number of indentation's tabulations or spaces has been found." }, { "patternId": "C0301", @@ -769,19 +769,19 @@ ] }, { - "patternId": "C0327", - "title": "mixed-line-endings (C0327)", - "description": "Mixed line endings LF and CRLF Used when there are mixed (LF and CRLF) newline signs in a file." + "patternId": "C0302", + "title": "too-many-lines (C0302)", + "description": "Too many lines in module (%s/%s) Used when a module has too many lines, reducing its readability." }, { - "patternId": "C0321", - "title": "multiple-statements (C0321)", - "description": "More than one statement on a single line Used when more than on statement are found on the same line." + "patternId": "C0303", + "title": "trailing-whitespace (C0303)", + "description": "Trailing whitespace Used when there is whitespace between the end of a line and the newline." }, { - "patternId": "C0302", - "title": "too-many-lines (C0302)", - "description": "Too many lines in module (%s/%s) Used when a module has too many lines, reducing its readability." + "patternId": "C0304", + "title": "missing-final-newline (C0304)", + "description": "Final newline missing Used when the last line in a file is missing a newline." }, { "patternId": "C0305", @@ -789,29 +789,39 @@ "description": "Trailing newlines Used when there are trailing blank lines in a file." }, { - "patternId": "C0303", - "title": "trailing-whitespace (C0303)", - "description": "Trailing whitespace Used when there is whitespace between the end of a line and the newline." - }, - { - "patternId": "C0328", - "title": "unexpected-line-ending-format (C0328)", - "description": "Unexpected line ending format. There is '%s' while it should be '%s'. Used when there is different newline than expected." + "patternId": "C0321", + "title": "multiple-statements (C0321)", + "description": "More than one statement on a single line Used when more than on statement are found on the same line." }, { "patternId": "C0325", "title": "superfluous-parens (C0325)", "description": "Unnecessary parens after %r keyword Used when a single item in parentheses follows an if, for, or other keyword." }, + { + "patternId": "C0327", + "title": "mixed-line-endings (C0327)", + "description": "Mixed line endings LF and CRLF Used when there are mixed (LF and CRLF) newline signs in a file." + }, + { + "patternId": "C0328", + "title": "unexpected-line-ending-format (C0328)", + "description": "Unexpected line ending format. There is '%s' while it should be '%s'. Used when there is different newline than expected." + }, { "patternId": "E0402", "title": "relative-beyond-top-level (E0402)", "description": "Attempted relative import beyond top-level package Used when a relative import tries to access too many levels in the current package." }, { - "patternId": "W4901", - "title": "deprecated-module (W4901)", - "description": "Deprecated module %r A module marked as deprecated is imported." + "patternId": "W0401", + "title": "wildcard-import (W0401)", + "description": "Wildcard import %s Used when from module import * is detected." + }, + { + "patternId": "W0404", + "title": "reimported (W0404)", + "description": "Reimport %r (imported line %s) Used when a module is imported more than once." }, { "patternId": "W0406", @@ -824,9 +834,9 @@ "description": "Prefer importing %r instead of %r Used when a module imported has a preferred replacement module." }, { - "patternId": "W0404", - "title": "reimported (W0404)", - "description": "Reimport %r (imported line %s) Used when a module is imported more than once." + "patternId": "W0410", + "title": "misplaced-future (W0410)", + "description": "__future__ import is not the first non docstring statement Python 2.5 and greater require __future__ import to be the first non docstring statement in the module." }, { "patternId": "W0416", @@ -834,14 +844,9 @@ "description": "Shadowed %r (imported line %s) Used when a module is aliased with a name that shadows another import." }, { - "patternId": "W0401", - "title": "wildcard-import (W0401)", - "description": "Wildcard import %s Used when from module import * is detected." - }, - { - "patternId": "W0410", - "title": "misplaced-future (W0410)", - "description": "__future__ import is not the first non docstring statement Python 2.5 and greater require __future__ import to be the first non docstring statement in the module." + "patternId": "W4901", + "title": "deprecated-module (W4901)", + "description": "Deprecated module %r A module marked as deprecated is imported." }, { "patternId": "R0401", @@ -853,11 +858,21 @@ "title": "consider-using-from-import (R0402)", "description": "Use 'from %s import %s' instead Emitted when a submodule of a package is imported and aliased with the same name, e.g., instead of import concurrent.futures as futures use from concurrent import futures." }, + { + "patternId": "C0410", + "title": "multiple-imports (C0410)", + "description": "Multiple imports on one line (%s) Used when import statement importing multiple modules is detected." + }, { "patternId": "C0411", "title": "wrong-import-order (C0411)", "description": "%s should be placed before %s Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)." }, + { + "patternId": "C0412", + "title": "ungrouped-imports (C0412)", + "description": "Imports from package %s are not grouped Used when imports are not grouped by packages." + }, { "patternId": "C0413", "title": "wrong-import-position (C0413)", @@ -873,16 +888,6 @@ "title": "import-outside-toplevel (C0415)", "description": "Import outside toplevel (%s) Used when an import statement is used anywhere other than the module toplevel. Move this import to the top of the file." }, - { - "patternId": "C0412", - "title": "ungrouped-imports (C0412)", - "description": "Imports from package %s are not grouped Used when imports are not grouped by packages." - }, - { - "patternId": "C0410", - "title": "multiple-imports (C0410)", - "description": "Multiple imports on one line (%s) Used when import statement importing multiple modules is detected." - }, { "patternId": "C3001", "title": "unnecessary-lambda-assignment (C3001)", @@ -893,25 +898,30 @@ "title": "unnecessary-direct-lambda-call (C3002)", "description": "Lambda expression called directly. Execute the expression inline instead. Used when a lambda expression is directly called rather than executing its contents inline." }, + { + "patternId": "E1200", + "title": "logging-unsupported-format (E1200)", + "description": "Unsupported logging format character %r (%#02x) at index %d Used when an unsupported format character is used in a logging statement format string." + }, { "patternId": "E1201", "title": "logging-format-truncated (E1201)", "description": "Logging format string ends in middle of conversion specifier Used when a logging statement format string terminates before the end of a conversion specifier." }, - { - "patternId": "E1206", - "title": "logging-too-few-args (E1206)", - "description": "Not enough arguments for logging format string Used when a logging format string is given too few arguments." - }, { "patternId": "E1205", "title": "logging-too-many-args (E1205)", "description": "Too many arguments for logging format string Used when a logging format string is given too many arguments." }, { - "patternId": "E1200", - "title": "logging-unsupported-format (E1200)", - "description": "Unsupported logging format character %r (%#02x) at index %d Used when an unsupported format character is used in a logging statement format string." + "patternId": "E1206", + "title": "logging-too-few-args (E1206)", + "description": "Not enough arguments for logging format string Used when a logging format string is given too few arguments." + }, + { + "patternId": "W1201", + "title": "logging-not-lazy (W1201)", + "description": "Use %s formatting in logging functions Used when a logging statement has a call form of \"logging.(format_string % (format_args...))\". Use another type of string formatting instead. You can use % formatting but leave interpolation to the logging function by passing the parameters as arguments. If logging-fstring- interpolation is disabled then you can use fstring formatting. If logging- format-interpolation is disabled then you can use str.format." }, { "patternId": "W1202", @@ -923,11 +933,6 @@ "title": "logging-fstring-interpolation (W1203)", "description": "Use %s formatting in logging functions Used when a logging statement has a call form of \"logging.(f\"...\")\".Use another type of string formatting instead. You can use % formatting but leave interpolation to the logging function by passing the parameters as arguments. If logging-format-interpolation is disabled then you can use str.format. If logging-not-lazy is disabled then you can use % formatting as normal." }, - { - "patternId": "W1201", - "title": "logging-not-lazy (W1201)", - "description": "Use %s formatting in logging functions Used when a logging statement has a call form of \"logging.(format_string % (format_args...))\". Use another type of string formatting instead. You can use % formatting but leave interpolation to the logging function by passing the parameters as arguments. If logging-fstring- interpolation is disabled then you can use fstring formatting. If logging- format-interpolation is disabled then you can use str.format." - }, { "patternId": "W0511", "title": "fixme (W0511)", @@ -959,84 +964,64 @@ "description": "Bad first argument %r given to super() Used when another argument than the current class is given as first argument of the super builtin." }, { - "patternId": "R1726", - "title": "simplifiable-condition (R1726)", - "description": "Boolean condition \"%s\" may be simplified to \"%s\" Emitted when a boolean condition is able to be simplified." + "patternId": "R1701", + "title": "consider-merging-isinstance (R1701)", + "description": "Consider merging these isinstance calls to isinstance(%s, (%s)) Used when multiple consecutive isinstance calls can be merged into one." }, { - "patternId": "R1727", - "title": "condition-evals-to-constant (R1727)", - "description": "Boolean condition '%s' will always evaluate to '%s' Emitted when a boolean condition can be simplified to a constant value." - }, - { - "patternId": "R1709", - "title": "simplify-boolean-expression (R1709)", - "description": "Boolean expression may be simplified to %s Emitted when redundant pre-python 2.5 ternary syntax is used." - }, - { - "patternId": "R1714", - "title": "consider-using-in (R1714)", - "description": "Consider merging these comparisons with 'in' by using '%s %sin (%s)'. Use a set instead if elements are hashable. To check if a variable is equal to one of many values, combine the values into a set or tuple and check if the variable is contained \"in\" it instead of checking for equality against each of the values. This is faster and less verbose." - }, - { - "patternId": "R1701", - "title": "consider-merging-isinstance (R1701)", - "description": "Consider merging these isinstance calls to isinstance(%s, (%s)) Used when multiple consecutive isinstance calls can be merged into one." - }, - { - "patternId": "R1735", - "title": "use-dict-literal (R1735)", - "description": "Consider using '%s' instead of a call to 'dict'. Emitted when using dict() to create a dictionary instead of a literal '{ ... }'. The literal is faster as it avoids an additional function call." + "patternId": "R1702", + "title": "too-many-nested-blocks (R1702)", + "description": "Too many nested blocks (%s/%s) Used when a function or a method has too many nested blocks. This makes the code less understandable and maintainable." }, { - "patternId": "R1731", - "title": "consider-using-max-builtin (R1731)", - "description": "Consider using '%s' instead of unnecessary if block Using the max builtin instead of a conditional improves readability and conciseness." + "patternId": "R1703", + "title": "simplifiable-if-statement (R1703)", + "description": "The if statement can be replaced with %s Used when an if statement can be replaced with 'bool(test)'." }, { - "patternId": "R1730", - "title": "consider-using-min-builtin (R1730)", - "description": "Consider using '%s' instead of unnecessary if block Using the min builtin instead of a conditional improves readability and conciseness." + "patternId": "R1704", + "title": "redefined-argument-from-local (R1704)", + "description": "Redefining argument with the local name %r Used when a local name is redefining an argument, which might suggest a potential error. This is taken in account only for a handful of name binding operations, such as for iteration, with statement assignment and exception handler assignment." }, { - "patternId": "R1722", - "title": "consider-using-sys-exit (R1722)", - "description": "Consider using 'sys.exit' instead Contrary to 'exit()' or 'quit()', 'sys.exit' does not rely on the site module being available (as the 'sys' module is always available)." + "patternId": "R1705", + "title": "no-else-return (R1705)", + "description": "Unnecessary \"%s\" after \"return\", %s Used in order to highlight an unnecessary block of code following an if, or a try/except containing a return statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a return statement." }, { - "patternId": "R1732", - "title": "consider-using-with (R1732)", - "description": "Consider using 'with' for resource-allocating operations Emitted if a resource-allocating assignment or call may be replaced by a 'with' block. By using 'with' the release of the allocated resources is ensured even in the case of an exception." + "patternId": "R1706", + "title": "consider-using-ternary (R1706)", + "description": "Consider using ternary (%s) Used when one of known pre-python 2.5 ternary syntax is used." }, { - "patternId": "R1725", - "title": "super-with-arguments (R1725)", - "description": "Consider using Python 3 style super() without arguments Emitted when calling the super() builtin with the current class and instance. On Python 3 these arguments are the default and they can be omitted." + "patternId": "R1707", + "title": "trailing-comma-tuple (R1707)", + "description": "Disallow trailing comma tuple In Python, a tuple is actually created by the comma symbol, not by the parentheses. Unfortunately, one can actually create a tuple by misplacing a trailing comma, which can lead to potential weird bugs in your code. You should always use parentheses explicitly for creating a tuple." }, { - "patternId": "R1734", - "title": "use-list-literal (R1734)", - "description": "Consider using [] instead of list() Emitted when using list() to create an empty list instead of the literal []. The literal is faster as it avoids an additional function call." + "patternId": "R1708", + "title": "stop-iteration-return (R1708)", + "description": "Do not raise StopIteration in generator, use return statement instead According to PEP479, the raise of StopIteration to end the loop of a generator may lead to hard to find bugs. This PEP specify that raise StopIteration has to be replaced by a simple return statement" }, { - "patternId": "R1717", - "title": "consider-using-dict-comprehension (R1717)", - "description": "Consider using a dictionary comprehension Emitted when we detect the creation of a dictionary using the dict() callable and a transient list. Although there is nothing syntactically wrong with this code, it is hard to read and can be simplified to a dict comprehension. Also it is faster since you don't need to create another transient list" + "patternId": "R1709", + "title": "simplify-boolean-expression (R1709)", + "description": "Boolean expression may be simplified to %s Emitted when redundant pre-python 2.5 ternary syntax is used." }, { - "patternId": "R1728", - "title": "consider-using-generator (R1728)", - "description": "Consider using a generator instead '%s(%s)' If your container can be large using a generator will bring better performance." + "patternId": "R1710", + "title": "inconsistent-return-statements (R1710)", + "description": "Either all return statements in a function should return an expression, or none of them should. According to PEP8, if any return statement returns an expression, any return statements where no value is returned should explicitly state this as return None, and an explicit return statement should be present at the end of the function (if reachable)" }, { - "patternId": "R1718", - "title": "consider-using-set-comprehension (R1718)", - "description": "Consider using a set comprehension Although there is nothing syntactically wrong with this code, it is hard to read and can be simplified to a set comprehension. Also it is faster since you don't need to create another transient list" + "patternId": "R1711", + "title": "useless-return (R1711)", + "description": "Useless return at end of function or method Emitted when a single \"return\" or \"return None\" statement is found at the end of function or method definition. This statement can safely be removed because Python will implicitly return None" }, { - "patternId": "R1715", - "title": "consider-using-get (R1715)", - "description": "Consider using dict.get for getting values from a dict if a key is present or a default if not Using the builtin dict.get for getting a value from a dictionary if a key is present or a default if not, is simpler and considered more idiomatic, although sometimes a bit slower" + "patternId": "R1712", + "title": "consider-swap-variables (R1712)", + "description": "Consider using tuple unpacking for swapping variables You do not have to use a temporary variable in order to swap variables. Using \"tuple unpacking\" to directly swap variables makes the intention more clear." }, { "patternId": "R1713", @@ -1044,39 +1029,29 @@ "description": "Consider using str.join(sequence) for concatenating strings from an iterable Using str.join(sequence) is faster, uses less memory and increases readability compared to for-loop iteration." }, { - "patternId": "R1706", - "title": "consider-using-ternary (R1706)", - "description": "Consider using ternary (%s) Used when one of known pre-python 2.5 ternary syntax is used." - }, - { - "patternId": "R1712", - "title": "consider-swap-variables (R1712)", - "description": "Consider using tuple unpacking for swapping variables You do not have to use a temporary variable in order to swap variables. Using \"tuple unpacking\" to directly swap variables makes the intention more clear." - }, - { - "patternId": "R1707", - "title": "trailing-comma-tuple (R1707)", - "description": "Disallow trailing comma tuple In Python, a tuple is actually created by the comma symbol, not by the parentheses. Unfortunately, one can actually create a tuple by misplacing a trailing comma, which can lead to potential weird bugs in your code. You should always use parentheses explicitly for creating a tuple." + "patternId": "R1714", + "title": "consider-using-in (R1714)", + "description": "Consider merging these comparisons with 'in' by using '%s %sin (%s)'. Use a set instead if elements are hashable. To check if a variable is equal to one of many values, combine the values into a set or tuple and check if the variable is contained \"in\" it instead of checking for equality against each of the values. This is faster and less verbose." }, { - "patternId": "R1708", - "title": "stop-iteration-return (R1708)", - "description": "Do not raise StopIteration in generator, use return statement instead According to PEP479, the raise of StopIteration to end the loop of a generator may lead to hard to find bugs. This PEP specify that raise StopIteration has to be replaced by a simple return statement" + "patternId": "R1715", + "title": "consider-using-get (R1715)", + "description": "Consider using dict.get for getting values from a dict if a key is present or a default if not Using the builtin dict.get for getting a value from a dictionary if a key is present or a default if not, is simpler and considered more idiomatic, although sometimes a bit slower" }, { - "patternId": "R1710", - "title": "inconsistent-return-statements (R1710)", - "description": "Either all return statements in a function should return an expression, or none of them should. According to PEP8, if any return statement returns an expression, any return statements where no value is returned should explicitly state this as return None, and an explicit return statement should be present at the end of the function (if reachable)" + "patternId": "R1716", + "title": "chained-comparison (R1716)", + "description": "Simplify chained comparison between the operands This message is emitted when pylint encounters boolean operation like \"a < b and b < c\", suggesting instead to refactor it to \"a < b < c\"" }, { - "patternId": "R1704", - "title": "redefined-argument-from-local (R1704)", - "description": "Redefining argument with the local name %r Used when a local name is redefining an argument, which might suggest a potential error. This is taken in account only for a handful of name binding operations, such as for iteration, with statement assignment and exception handler assignment." + "patternId": "R1717", + "title": "consider-using-dict-comprehension (R1717)", + "description": "Consider using a dictionary comprehension Emitted when we detect the creation of a dictionary using the dict() callable and a transient list. Although there is nothing syntactically wrong with this code, it is hard to read and can be simplified to a dict comprehension. Also it is faster since you don't need to create another transient list" }, { - "patternId": "R1716", - "title": "chained-comparison (R1716)", - "description": "Simplify chained comparison between the operands This message is emitted when pylint encounters boolean operation like \"a < b and b < c\", suggesting instead to refactor it to \"a < b < c\"" + "patternId": "R1718", + "title": "consider-using-set-comprehension (R1718)", + "description": "Consider using a set comprehension Although there is nothing syntactically wrong with this code, it is hard to read and can be simplified to a set comprehension. Also it is faster since you don't need to create another transient list" }, { "patternId": "R1719", @@ -1084,14 +1059,19 @@ "description": "The if expression can be replaced with %s Used when an if expression can be replaced with 'bool(test)' or simply 'test' if the boolean cast is implicit." }, { - "patternId": "R1703", - "title": "simplifiable-if-statement (R1703)", - "description": "The if statement can be replaced with %s Used when an if statement can be replaced with 'bool(test)'." + "patternId": "R1720", + "title": "no-else-raise (R1720)", + "description": "Unnecessary \"%s\" after \"raise\", %s Used in order to highlight an unnecessary block of code following an if, or a try/except containing a raise statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a raise statement." }, { - "patternId": "R1702", - "title": "too-many-nested-blocks (R1702)", - "description": "Too many nested blocks (%s/%s) Used when a function or a method has too many nested blocks. This makes the code less understandable and maintainable." + "patternId": "R1721", + "title": "unnecessary-comprehension (R1721)", + "description": "Unnecessary use of a comprehension, use %s instead. Instead of using an identity comprehension, consider using the list, dict or set constructor. It is faster and simpler." + }, + { + "patternId": "R1722", + "title": "consider-using-sys-exit (R1722)", + "description": "Consider using 'sys.exit' instead Contrary to 'exit()' or 'quit()', 'sys.exit' does not rely on the site module being available (as the 'sys' module is always available)." }, { "patternId": "R1723", @@ -1104,65 +1084,80 @@ "description": "Unnecessary \"%s\" after \"continue\", %s Used in order to highlight an unnecessary block of code following an if containing a continue statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a continue statement." }, { - "patternId": "R1720", - "title": "no-else-raise (R1720)", - "description": "Unnecessary \"%s\" after \"raise\", %s Used in order to highlight an unnecessary block of code following an if containing a raise statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a raise statement." + "patternId": "R1725", + "title": "super-with-arguments (R1725)", + "description": "Consider using Python 3 style super() without arguments Emitted when calling the super() builtin with the current class and instance. On Python 3 these arguments are the default and they can be omitted." }, { - "patternId": "R1705", - "title": "no-else-return (R1705)", - "description": "Unnecessary \"%s\" after \"return\", %s Used in order to highlight an unnecessary block of code following an if containing a return statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a return statement." + "patternId": "R1726", + "title": "simplifiable-condition (R1726)", + "description": "Boolean condition \"%s\" may be simplified to \"%s\" Emitted when a boolean condition is able to be simplified." }, { - "patternId": "R1733", - "title": "unnecessary-dict-index-lookup (R1733)", - "description": "Unnecessary dictionary index lookup, use '%s' instead Emitted when iterating over the dictionary items (key-item pairs) and accessing the value by index lookup. The value can be accessed directly instead." + "patternId": "R1727", + "title": "condition-evals-to-constant (R1727)", + "description": "Boolean condition '%s' will always evaluate to '%s' Emitted when a boolean condition can be simplified to a constant value." }, { - "patternId": "R1736", - "title": "unnecessary-list-index-lookup (R1736)", - "description": "Unnecessary list index lookup, use '%s' instead Emitted when iterating over an enumeration and accessing the value by index lookup. The value can be accessed directly instead." + "patternId": "R1728", + "title": "consider-using-generator (R1728)", + "description": "Consider using a generator instead '%s(%s)' If your container can be large using a generator will bring better performance." }, { - "patternId": "R1721", - "title": "unnecessary-comprehension (R1721)", - "description": "Unnecessary use of a comprehension, use %s instead. Instead of using an identity comprehension, consider using the list, dict or set constructor. It is faster and simpler." + "patternId": "R1729", + "title": "use-a-generator (R1729)", + "description": "Use a generator instead '%s(%s)' Comprehension inside of 'any', 'all', 'max', 'min' or 'sum' is unnecessary. A generator would be sufficient and faster." }, { - "patternId": "R1737", - "title": "use-yield-from (R1737)", - "description": "Use 'yield from' directly instead of yielding each element one by one Yielding directly from the iterator is faster and arguably cleaner code than yielding each element one by one in the loop." + "patternId": "R1730", + "title": "consider-using-min-builtin (R1730)", + "description": "Consider using '%s' instead of unnecessary if block Using the min builtin instead of a conditional improves readability and conciseness." }, { - "patternId": "R1729", - "title": "use-a-generator (R1729)", - "description": "Use a generator instead '%s(%s)' Comprehension inside of 'any', 'all', 'max', 'min' or 'sum' is unnecessary. A generator would be sufficient and faster." + "patternId": "R1731", + "title": "consider-using-max-builtin (R1731)", + "description": "Consider using '%s' instead of unnecessary if block Using the max builtin instead of a conditional improves readability and conciseness." }, { - "patternId": "R1711", - "title": "useless-return (R1711)", - "description": "Useless return at end of function or method Emitted when a single \"return\" or \"return None\" statement is found at the end of function or method definition. This statement can safely be removed because Python will implicitly return None" + "patternId": "R1732", + "title": "consider-using-with (R1732)", + "description": "Consider using 'with' for resource-allocating operations Emitted if a resource-allocating assignment or call may be replaced by a 'with' block. By using 'with' the release of the allocated resources is ensured even in the case of an exception." }, { - "patternId": "C1803", - "title": "use-implicit-booleaness-not-comparison (C1803)", - "description": "\"%s\" can be simplified to \"%s\", if it is strictly a sequence, as an empty %s is falsey Empty sequences are considered false in a boolean context. Following this check blindly in weakly typed code base can create hard to debug issues. If the value can be something else that is falsey but not a sequence (for example None, an empty string, or 0) the code will not be equivalent." + "patternId": "R1733", + "title": "unnecessary-dict-index-lookup (R1733)", + "description": "Unnecessary dictionary index lookup, use '%s' instead Emitted when iterating over the dictionary items (key-item pairs) and accessing the value by index lookup. The value can be accessed directly instead." }, { - "patternId": "C1804", - "title": "use-implicit-booleaness-not-comparison-to-string (C1804)", - "description": "\"%s\" can be simplified to \"%s\", if it is strictly a string, as an empty string is falsey Empty string are considered false in a boolean context. Following this check blindly in weakly typed code base can create hard to debug issues. If the value can be something else that is falsey but not a string (for example None, an empty sequence, or 0) the code will not be equivalent." + "patternId": "R1734", + "title": "use-list-literal (R1734)", + "description": "Consider using [] instead of list() Emitted when using list() to create an empty list instead of the literal []. The literal is faster as it avoids an additional function call." }, { - "patternId": "C1805", - "title": "use-implicit-booleaness-not-comparison-to-zero (C1805)", - "description": "\"%s\" can be simplified to \"%s\", if it is strictly an int, as 0 is falsey 0 is considered false in a boolean context. Following this check blindly in weakly typed code base can create hard to debug issues. If the value can be something else that is falsey but not an int (for example None, an empty string, or an empty sequence) the code will not be equivalent." + "patternId": "R1735", + "title": "use-dict-literal (R1735)", + "description": "Consider using '%s' instead of a call to 'dict'. Emitted when using dict() to create a dictionary instead of a literal '{ ... }'. The literal is faster as it avoids an additional function call." + }, + { + "patternId": "R1736", + "title": "unnecessary-list-index-lookup (R1736)", + "description": "Unnecessary list index lookup, use '%s' instead Emitted when iterating over an enumeration and accessing the value by index lookup. The value can be accessed directly instead." + }, + { + "patternId": "R1737", + "title": "use-yield-from (R1737)", + "description": "Use 'yield from' directly instead of yielding each element one by one Yielding directly from the iterator is faster and arguably cleaner code than yielding each element one by one in the loop." }, { "patternId": "C0117", "title": "unnecessary-negation (C0117)", "description": "Consider changing \"%s\" to \"%s\" Used when a boolean expression contains an unneeded negation, e.g. when two negation operators cancel each other out." }, + { + "patternId": "C0200", + "title": "consider-using-enumerate (C0200)", + "description": "Consider using enumerate instead of iterating with range and len Emitted when code that iterates with range and len is encountered. Such code can be simplified by using the enumerate builtin." + }, { "patternId": "C0201", "title": "consider-iterating-dictionary (C0201)", @@ -1174,14 +1169,14 @@ "description": "Consider iterating with .items() Emitted when iterating over the keys of a dictionary and accessing the value by index lookup. Both the key and value can be accessed by iterating using the .items() method of the dictionary instead." }, { - "patternId": "C0200", - "title": "consider-using-enumerate (C0200)", - "description": "Consider using enumerate instead of iterating with range and len Emitted when code that iterates with range and len is encountered. Such code can be simplified by using the enumerate builtin." + "patternId": "C0207", + "title": "use-maxsplit-arg (C0207)", + "description": "Use %s instead Emitted when accessing only the first or last element of str.split(). The first and last element can be accessed by using str.split(sep, maxsplit=1)[0] or str.rsplit(sep, maxsplit=1)[-1] instead." }, { - "patternId": "C1802", - "title": "use-implicit-booleaness-not-len (C1802)", - "description": "Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty Empty sequences are considered false in a boolean context. You can either remove the call to 'len' (if not x) or compare the length against a scalar (if len(x) > 1)." + "patternId": "C0208", + "title": "use-sequence-for-iteration (C0208)", + "description": "Use a sequence type when iterating over values When iterating over values, sequence types (e.g., lists, tuples, ranges) are more efficient than sets." }, { "patternId": "C0209", @@ -1189,25 +1184,30 @@ "description": "Formatting a regular string which could be an f-string Used when we detect a string that is being formatted with format() or % which could potentially be an f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6." }, { - "patternId": "C0207", - "title": "use-maxsplit-arg (C0207)", - "description": "Use %s instead Emitted when accessing only the first or last element of str.split(). The first and last element can be accessed by using str.split(sep, maxsplit=1)[0] or str.rsplit(sep, maxsplit=1)[-1] instead." + "patternId": "C1802", + "title": "use-implicit-booleaness-not-len (C1802)", + "description": "Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty Empty sequences are considered false in a boolean context. You can either remove the call to 'len' (if not x) or compare the length against a scalar (if len(x) > 1)." }, { - "patternId": "C0208", - "title": "use-sequence-for-iteration (C0208)", - "description": "Use a sequence type when iterating over values When iterating over values, sequence types (e.g., lists, tuples, ranges) are more efficient than sets." + "patternId": "C1803", + "title": "use-implicit-booleaness-not-comparison (C1803)", + "description": "\"%s\" can be simplified to \"%s\", if it is strictly a sequence, as an empty %s is falsey Empty sequences are considered false in a boolean context. Following this check blindly in weakly typed code base can create hard to debug issues. If the value can be something else that is falsey but not a sequence (for example None, an empty string, or 0) the code will not be equivalent." + }, + { + "patternId": "C1804", + "title": "use-implicit-booleaness-not-comparison-to-string (C1804)", + "description": "\"%s\" can be simplified to \"%s\", if it is strictly a string, as an empty string is falsey Empty string are considered false in a boolean context. Following this check blindly in weakly typed code base can create hard to debug issues. If the value can be something else that is falsey but not a string (for example None, an empty sequence, or 0) the code will not be equivalent." + }, + { + "patternId": "C1805", + "title": "use-implicit-booleaness-not-comparison-to-zero (C1805)", + "description": "\"%s\" can be simplified to \"%s\", if it is strictly an int, as 0 is falsey 0 is considered false in a boolean context. Following this check blindly in weakly typed code base can create hard to debug issues. If the value can be something else that is falsey but not an int (for example None, an empty string, or an empty sequence) the code will not be equivalent." }, { "patternId": "R0801", "title": "duplicate-code (R0801)", "description": "Similar lines in %s files Indicates that a set of similar lines has been detected among multiple file. This usually means that the code should be refactored to avoid this duplication." }, - { - "patternId": "C0403", - "title": "invalid-characters-in-docstring (C0403)", - "description": "Invalid characters %r in a docstring Used when a word in docstring cannot be checked by enchant." - }, { "patternId": "C0401", "title": "wrong-spelling-in-comment (C0401)", @@ -1218,6 +1218,11 @@ "title": "wrong-spelling-in-docstring (C0402)", "description": "Wrong spelling of a word '%s' in a docstring: Used when a word in docstring is not spelled correctly." }, + { + "patternId": "C0403", + "title": "invalid-characters-in-docstring (C0403)", + "description": "Invalid characters %r in a docstring Used when a word in docstring cannot be checked by enchant." + }, { "patternId": "E1507", "title": "invalid-envvar-value (E1507)", @@ -1238,51 +1243,66 @@ "title": "bad-open-mode (W1501)", "description": "\"%s\" is not a valid mode for open. Python supports: r, w, a[, x] modes with b, +, and U (only with r) options. See https://docs.python.org/3/library/functions.html#open" }, + { + "patternId": "W1502", + "title": "boolean-datetime (W1502)", + "description": "Using datetime.time in a boolean context. Using datetime.time in a boolean context can hide subtle bugs when the time they represent matches midnight UTC. This behaviour was fixed in Python 3.5. See https://bugs.python.org/issue13936 for reference. This message can't be emitted when using Python >= 3.5." + }, + { + "patternId": "W1503", + "title": "redundant-unittest-assert (W1503)", + "description": "Redundant use of %s with constant value %r The first argument of assertTrue and assertFalse is a condition. If a constant is passed as parameter, that condition will be always true. In this case a warning should be emitted." + }, + { + "patternId": "W1506", + "title": "bad-thread-instantiation (W1506)", + "description": "threading.Thread needs the target function The warning is emitted when a threading.Thread class is instantiated without the target function being passed as a kwarg or as a second argument. By default, the first parameter is the group param, not the target param." + }, + { + "patternId": "W1507", + "title": "shallow-copy-environ (W1507)", + "description": "Using copy.copy(os.environ). Use os.environ.copy() instead. os.environ is not a dict object but proxy object, so shallow copy has still effects on original object. See https://bugs.python.org/issue15373 for reference." + }, { "patternId": "W1508", "title": "invalid-envvar-default (W1508)", "description": "%s default type is %s. Expected str or None. Env manipulation functions return None or str values. Supplying anything different as a default may cause bugs. See https://docs.python.org/3/library/os.html#os.getenv." }, { - "patternId": "W1518", - "title": "method-cache-max-size-none (W1518)", - "description": "'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self' By decorating a method with lru_cache or cache the 'self' argument will be linked to the function and therefore never garbage collected. Unless your instance will never need to be garbage collected (singleton) it is recommended to refactor code to avoid this pattern or add a maxsize to the cache. The default value for maxsize is 128." + "patternId": "W1509", + "title": "subprocess-popen-preexec-fn (W1509)", + "description": "Using preexec_fn keyword which may be unsafe in the presence of threads The preexec_fn parameter is not safe to use in the presence of threads in your application. The child process could deadlock before exec is called. If you must use it, keep it trivial! Minimize the number of libraries you call into. See https://docs.python.org/3/library/subprocess.html#popen-constructor" }, { "patternId": "W1510", "title": "subprocess-run-check (W1510)", "description": "'subprocess.run' used without explicitly defining the value for 'check'. The check keyword is set to False by default. It means the process launched by subprocess.run can exit with a non-zero exit code and fail silently. It's better to set it explicitly to make clear what the error- handling behavior is." }, + { + "patternId": "W1514", + "title": "unspecified-encoding (W1514)", + "description": "Using open without explicitly specifying an encoding It is better to specify an encoding when opening documents. Using the system default implicitly can create problems on other operating systems. See https://peps.python.org/pep-0597/ This message can't be emitted when using Python >= 3.15." + }, { "patternId": "W1515", "title": "forgotten-debug-statement (W1515)", "description": "Leaving functions creating breakpoints in production code is not recommended Calls to breakpoint(), sys.breakpointhook() and pdb.set_trace() should be removed from code that is not actively being debugged." }, { - "patternId": "W1503", - "title": "redundant-unittest-assert (W1503)", - "description": "Redundant use of %s with constant value %r The first argument of assertTrue and assertFalse is a condition. If a constant is passed as parameter, that condition will be always true. In this case a warning should be emitted." - }, - { - "patternId": "W1507", - "title": "shallow-copy-environ (W1507)", - "description": "Using copy.copy(os.environ). Use os.environ.copy() instead. os.environ is not a dict object but proxy object, so shallow copy has still effects on original object. See https://bugs.python.org/issue15373 for reference." + "patternId": "W1518", + "title": "method-cache-max-size-none (W1518)", + "description": "'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self' By decorating a method with lru_cache or cache the 'self' argument will be linked to the function and therefore never garbage collected. Unless your instance will never need to be garbage collected (singleton) it is recommended to refactor code to avoid this pattern or add a maxsize to the cache. The default value for maxsize is 128." }, { - "patternId": "W1502", - "title": "boolean-datetime (W1502)", - "description": "Using datetime.time in a boolean context. Using datetime.time in a boolean context can hide subtle bugs when the time they represent matches midnight UTC. This behaviour was fixed in Python 3.5. See https://bugs.python.org/issue13936 for reference. This message can't be emitted when using Python >= 3.5." + "patternId": "W4902", + "title": "deprecated-method (W4902)", + "description": "Using deprecated method %s() The method is marked as deprecated and will be removed in the future." }, { "patternId": "W4903", "title": "deprecated-argument (W4903)", "description": "Using deprecated argument %s of method %s() The argument is marked as deprecated and will be removed in the future." }, - { - "patternId": "W4906", - "title": "deprecated-attribute (W4906)", - "description": "Using deprecated attribute %r The attribute is marked as deprecated and will be removed in the future." - }, { "patternId": "W4904", "title": "deprecated-class (W4904)", @@ -1294,134 +1314,99 @@ "description": "Using deprecated decorator %s() The decorator is marked as deprecated and will be removed in the future." }, { - "patternId": "W4902", - "title": "deprecated-method (W4902)", - "description": "Using deprecated method %s() The method is marked as deprecated and will be removed in the future." - }, - { - "patternId": "W1514", - "title": "unspecified-encoding (W1514)", - "description": "Using open without explicitly specifying an encoding It is better to specify an encoding when opening documents. Using the system default implicitly can create problems on other operating systems. See https://peps.python.org/pep-0597/" + "patternId": "W4906", + "title": "deprecated-attribute (W4906)", + "description": "Using deprecated attribute %r The attribute is marked as deprecated and will be removed in the future." }, { - "patternId": "W1509", - "title": "subprocess-popen-preexec-fn (W1509)", - "description": "Using preexec_fn keyword which may be unsafe in the presence of threads The preexec_fn parameter is not safe to use in the presence of threads in your application. The child process could deadlock before exec is called. If you must use it, keep it trivial! Minimize the number of libraries you call into. See https://docs.python.org/3/library/subprocess.html#popen-constructor" + "patternId": "E1300", + "title": "bad-format-character (E1300)", + "description": "Unsupported format character %r (%#02x) at index %d Used when an unsupported format character is used in a format string." }, { - "patternId": "W1506", - "title": "bad-thread-instantiation (W1506)", - "description": "threading.Thread needs the target function The warning is emitted when a threading.Thread class is instantiated without the target function being passed as a kwarg or as a second argument. By default, the first parameter is the group param, not the target param." + "patternId": "E1301", + "title": "truncated-format-string (E1301)", + "description": "Format string ends in middle of conversion specifier Used when a format string terminates before the end of a conversion specifier." }, { - "patternId": "E1307", - "title": "bad-string-format-type (E1307)", - "description": "Argument %r does not match format type %r Used when a type required by format string is not suitable for actual argument type" + "patternId": "E1302", + "title": "mixed-format-string (E1302)", + "description": "Mixing named and unnamed conversion specifiers in format string Used when a format string contains both named (e.g. '%(foo)d') and unnamed (e.g. '%d') conversion specifiers. This is also used when a named conversion specifier contains * for the minimum field width and/or precision." }, { "patternId": "E1303", "title": "format-needs-mapping (E1303)", "description": "Expected mapping for format string, not %s Used when a format string that uses named conversion specifiers is used with an argument that is not a mapping." }, - { - "patternId": "E1301", - "title": "truncated-format-string (E1301)", - "description": "Format string ends in middle of conversion specifier Used when a format string terminates before the end of a conversion specifier." - }, { "patternId": "E1304", "title": "missing-format-string-key (E1304)", "description": "Missing key %r in format string dictionary Used when a format string that uses named conversion specifiers is used with a dictionary that doesn't contain all the keys required by the format string." }, { - "patternId": "E1302", - "title": "mixed-format-string (E1302)", - "description": "Mixing named and unnamed conversion specifiers in format string Used when a format string contains both named (e.g. '%(foo)d') and unnamed (e.g. '%d') conversion specifiers. This is also used when a named conversion specifier contains * for the minimum field width and/or precision." + "patternId": "E1305", + "title": "too-many-format-args (E1305)", + "description": "Too many arguments for format string Used when a format string that uses unnamed conversion specifiers is given too many arguments." }, { "patternId": "E1306", "title": "too-few-format-args (E1306)", "description": "Not enough arguments for format string Used when a format string that uses unnamed conversion specifiers is given too few arguments" }, + { + "patternId": "E1307", + "title": "bad-string-format-type (E1307)", + "description": "Argument %r does not match format type %r Used when a type required by format string is not suitable for actual argument type" + }, { "patternId": "E1310", "title": "bad-str-strip-call (E1310)", "description": "Suspicious argument in %s.%s call The argument to a str.{l,r,}strip call contains a duplicate character," }, - { - "patternId": "E1305", - "title": "too-many-format-args (E1305)", - "description": "Too many arguments for format string Used when a format string that uses unnamed conversion specifiers is given too many arguments." - }, - { - "patternId": "E1300", - "title": "bad-format-character (E1300)", - "description": "Unsupported format character %r (%#02x) at index %d Used when an unsupported format character is used in a format string." - }, - { - "patternId": "W1402", - "title": "anomalous-unicode-escape-in-string (W1402)", - "description": "Anomalous Unicode escape in byte string: '%s'. String constant might be missing an r or u prefix. Used when an escape like u is encountered in a byte string where it has no effect." - }, - { - "patternId": "W1401", - "title": "anomalous-backslash-in-string (W1401)", - "description": "Anomalous backslash in string: '%s'. String constant might be missing an r prefix. Used when a backslash is in a literal string but not as an escape." - }, - { - "patternId": "W1308", - "title": "duplicate-string-formatting-argument (W1308)", - "description": "Duplicate string formatting argument %r, consider passing as named argument Used when we detect that a string formatting is repeating an argument instead of using named string arguments" - }, - { - "patternId": "W1305", - "title": "format-combined-specification (W1305)", - "description": "Format string contains both automatic field numbering and manual field specification Used when a PEP 3101 format string contains both automatic field numbering (e.g. '{}') and manual field specification (e.g. '{0}')." - }, { "patternId": "W1300", "title": "bad-format-string-key (W1300)", "description": "Format string dictionary key should be a string, not %s Used when a format string that uses named conversion specifiers is used with a dictionary whose keys are not all strings." }, { - "patternId": "W1404", - "title": "implicit-str-concat (W1404)", - "description": "Implicit string concatenation found in %s String literals are implicitly concatenated in a literal iterable definition : maybe a comma is missing ?" + "patternId": "W1301", + "title": "unused-format-string-key (W1301)", + "description": "Unused key %r in format string dictionary Used when a format string that uses named conversion specifiers is used with a dictionary that contains keys not required by the format string." }, { "patternId": "W1302", "title": "bad-format-string (W1302)", "description": "Invalid format string Used when a PEP 3101 format string is invalid." }, - { - "patternId": "W1306", - "title": "missing-format-attribute (W1306)", - "description": "Missing format attribute %r in format specifier %r Used when a PEP 3101 format string uses an attribute specifier ({0.length}), but the argument passed for formatting doesn't have that attribute." - }, { "patternId": "W1303", "title": "missing-format-argument-key (W1303)", "description": "Missing keyword argument %r for format string Used when a PEP 3101 format string that uses named fields doesn't receive one or more required keywords." }, { - "patternId": "W1405", - "title": "inconsistent-quotes (W1405)", - "description": "Quote delimiter %s is inconsistent with the rest of the file Quote delimiters are not used consistently throughout a module (with allowances made for avoiding unnecessary escaping)." + "patternId": "W1304", + "title": "unused-format-string-argument (W1304)", + "description": "Unused format argument %r Used when a PEP 3101 format string that uses named fields is used with an argument that is not required by the format string." }, { - "patternId": "W1406", - "title": "redundant-u-string-prefix (W1406)", - "description": "The u prefix for strings is no longer necessary in Python >=3.0 Used when we detect a string with a u prefix. These prefixes were necessary in Python 2 to indicate a string was Unicode, but since Python 3.0 strings are Unicode by default." + "patternId": "W1305", + "title": "format-combined-specification (W1305)", + "description": "Format string contains both automatic field numbering and manual field specification Used when a PEP 3101 format string contains both automatic field numbering (e.g. '{}') and manual field specification (e.g. '{0}')." }, { - "patternId": "W1304", - "title": "unused-format-string-argument (W1304)", - "description": "Unused format argument %r Used when a PEP 3101 format string that uses named fields is used with an argument that is not required by the format string." + "patternId": "W1306", + "title": "missing-format-attribute (W1306)", + "description": "Missing format attribute %r in format specifier %r Used when a PEP 3101 format string uses an attribute specifier ({0.length}), but the argument passed for formatting doesn't have that attribute." }, { - "patternId": "W1301", - "title": "unused-format-string-key (W1301)", - "description": "Unused key %r in format string dictionary Used when a format string that uses named conversion specifiers is used with a dictionary that contains keys not required by the format string." + "patternId": "W1307", + "title": "invalid-format-index (W1307)", + "description": "Using invalid lookup key %r in format specifier %r Used when a PEP 3101 format string uses a lookup specifier ({a[1]}), but the argument passed for formatting doesn't contain or doesn't have that key as an attribute." + }, + { + "patternId": "W1308", + "title": "duplicate-string-formatting-argument (W1308)", + "description": "Duplicate string formatting argument %r, consider passing as named argument Used when we detect that a string formatting is repeating an argument instead of using named string arguments" }, { "patternId": "W1309", @@ -1434,34 +1419,34 @@ "description": "Using formatting for a string that does not have any interpolated variables Used when we detect a string that does not have any interpolation variables, in which case it can be either a normal string without formatting or a bug in the code." }, { - "patternId": "W1307", - "title": "invalid-format-index (W1307)", - "description": "Using invalid lookup key %r in format specifier %r Used when a PEP 3101 format string uses a lookup specifier ({a[1]}), but the argument passed for formatting doesn't contain or doesn't have that key as an attribute." + "patternId": "W1401", + "title": "anomalous-backslash-in-string (W1401)", + "description": "Anomalous backslash in string: '%s'. String constant might be missing an r prefix. Used when a backslash is in a literal string but not as an escape." }, { - "patternId": "W2101", - "title": "useless-with-lock (W2101)", - "description": "'%s()' directly created in 'with' has no effect Used when a new lock instance is created by using with statement which has no effect. Instead, an existing instance should be used to acquire lock." + "patternId": "W1402", + "title": "anomalous-unicode-escape-in-string (W1402)", + "description": "Anomalous Unicode escape in byte string: '%s'. String constant might be missing an r or u prefix. Used when an escape like u is encountered in a byte string where it has no effect." }, { - "patternId": "E1137", - "title": "unsupported-assignment-operation (E1137)", - "description": "%r does not support item assignment Emitted when an object does not support item assignment (i.e. doesn't define __setitem__ method)." + "patternId": "W1404", + "title": "implicit-str-concat (W1404)", + "description": "Implicit string concatenation found in %s String literals are implicitly concatenated in a literal iterable definition : maybe a comma is missing ?" }, { - "patternId": "E1138", - "title": "unsupported-delete-operation (E1138)", - "description": "%r does not support item deletion Emitted when an object does not support item deletion (i.e. doesn't define __delitem__ method)." + "patternId": "W1405", + "title": "inconsistent-quotes (W1405)", + "description": "Quote delimiter %s is inconsistent with the rest of the file Quote delimiters are not used consistently throughout a module (with allowances made for avoiding unnecessary escaping)." }, { - "patternId": "E1130", - "title": "invalid-unary-operand-type (E1130)", - "description": "Emitted when a unary operand is used on an object which does not support this type of operation." + "patternId": "W1406", + "title": "redundant-u-string-prefix (W1406)", + "description": "The u prefix for strings is no longer necessary in Python >=3.0 Used when we detect a string with a u prefix. These prefixes were necessary in Python 2 to indicate a string was Unicode, but since Python 3.0 strings are Unicode by default." }, { - "patternId": "E1131", - "title": "unsupported-binary-operation (E1131)", - "description": "Emitted when a binary arithmetic operation between two operands is not supported." + "patternId": "W2101", + "title": "useless-with-lock (W2101)", + "description": "'%s()' directly created in 'with' has no effect Used when a new lock instance is created by using with statement which has no effect. Instead, an existing instance should be used to acquire lock." }, { "patternId": "E1101", @@ -1474,14 +1459,24 @@ "description": "%s is not callable Used when an object being called has been inferred to a non callable object." }, { - "patternId": "E1143", - "title": "unhashable-member (E1143)", - "description": "'%s' is unhashable and can't be used as a %s in a %s Emitted when a dict key or set member is not hashable (i.e. doesn't define __hash__ method)." + "patternId": "E1111", + "title": "assignment-from-no-return (E1111)", + "description": "Assigning result of a function call, where the function has no return Used when an assignment is done on a function call but the inferred function doesn't return anything." }, { - "patternId": "E1142", - "title": "await-outside-async (E1142)", - "description": "'await' should be used within an async function Emitted when await is used outside an async function." + "patternId": "E1120", + "title": "no-value-for-parameter (E1120)", + "description": "No value for argument %s in %s call Used when a function call passes too few arguments." + }, + { + "patternId": "E1121", + "title": "too-many-function-args (E1121)", + "description": "Too many positional arguments for %s call Used when a function call passes too many positional arguments." + }, + { + "patternId": "E1123", + "title": "unexpected-keyword-arg (E1123)", + "description": "Unexpected keyword argument %r in %s call Used when a function call passes a keyword argument that doesn't correspond to one of the function's parameter names." }, { "patternId": "E1124", @@ -1489,9 +1484,19 @@ "description": "Argument %r passed by position and keyword in %s call Used when a function call would result in assigning multiple values to a function parameter, one value from a positional argument and one from a keyword argument." }, { - "patternId": "E1111", - "title": "assignment-from-no-return (E1111)", - "description": "Assigning result of a function call, where the function has no return Used when an assignment is done on a function call but the inferred function doesn't return anything." + "patternId": "E1125", + "title": "missing-kwoa (E1125)", + "description": "Missing mandatory keyword argument %r in %s call Used when a function call does not pass a mandatory keyword-only argument." + }, + { + "patternId": "E1126", + "title": "invalid-sequence-index (E1126)", + "description": "Sequence index is not an int, slice, or instance with __index__ Used when a sequence type is indexed with an invalid type. Valid types are ints, slices, and objects with an __index__ method." + }, + { + "patternId": "E1127", + "title": "invalid-slice-index (E1127)", + "description": "Slice index is not an int, None, or instance with __index__ Used when a slice index is not an integer, None, or an object with an __index__ method." }, { "patternId": "E1128", @@ -1504,24 +1509,19 @@ "description": "Context manager '%s' doesn't implement __enter__ and __exit__. Used when an instance in a with statement doesn't implement the context manager protocol(__enter__/__exit__)." }, { - "patternId": "E1132", - "title": "repeated-keyword (E1132)", - "description": "Got multiple values for keyword argument %r in function call Emitted when a function call got multiple values for a keyword." - }, - { - "patternId": "E1139", - "title": "invalid-metaclass (E1139)", - "description": "Invalid metaclass %r used Emitted whenever we can detect that a class is using, as a metaclass, something which might be invalid for using as a metaclass." + "patternId": "E1130", + "title": "invalid-unary-operand-type (E1130)", + "description": "Emitted when a unary operand is used on an object which does not support this type of operation." }, { - "patternId": "E1125", - "title": "missing-kwoa (E1125)", - "description": "Missing mandatory keyword argument %r in %s call Used when a function call does not pass a mandatory keyword-only argument." + "patternId": "E1131", + "title": "unsupported-binary-operation (E1131)", + "description": "Emitted when a binary arithmetic operation between two operands is not supported." }, { - "patternId": "E1120", - "title": "no-value-for-parameter (E1120)", - "description": "No value for argument %s in %s call Used when a function call passes too few arguments." + "patternId": "E1132", + "title": "repeated-keyword (E1132)", + "description": "Got multiple values for keyword argument %r in function call Emitted when a function call got multiple values for a keyword." }, { "patternId": "E1133", @@ -1534,29 +1534,29 @@ "description": "Non-mapping value %s is used in a mapping context Used when a non-mapping value is used in place where mapping is expected" }, { - "patternId": "E1126", - "title": "invalid-sequence-index (E1126)", - "description": "Sequence index is not an int, slice, or instance with __index__ Used when a sequence type is indexed with an invalid type. Valid types are ints, slices, and objects with an __index__ method." + "patternId": "E1135", + "title": "unsupported-membership-test (E1135)", + "description": "Value '%s' doesn't support membership test Emitted when an instance in membership test expression doesn't implement membership protocol (__contains__/__iter__/__getitem__)." }, { - "patternId": "E1127", - "title": "invalid-slice-index (E1127)", - "description": "Slice index is not an int, None, or instance with __index__ Used when a slice index is not an integer, None, or an object with an __index__ method." + "patternId": "E1136", + "title": "unsubscriptable-object (E1136)", + "description": "Value '%s' is unsubscriptable Emitted when a subscripted value doesn't support subscription (i.e. doesn't define __getitem__ method or __class_getitem__ for a class)." }, { - "patternId": "E1144", - "title": "invalid-slice-step (E1144)", - "description": "Slice step cannot be 0 Used when a slice step is 0 and the object doesn't implement a custom __getitem__ method." + "patternId": "E1137", + "title": "unsupported-assignment-operation (E1137)", + "description": "%r does not support item assignment Emitted when an object does not support item assignment (i.e. doesn't define __setitem__ method)." }, { - "patternId": "E1121", - "title": "too-many-function-args (E1121)", - "description": "Too many positional arguments for %s call Used when a function call passes too many positional arguments." + "patternId": "E1138", + "title": "unsupported-delete-operation (E1138)", + "description": "%r does not support item deletion Emitted when an object does not support item deletion (i.e. doesn't define __delitem__ method)." }, { - "patternId": "E1123", - "title": "unexpected-keyword-arg (E1123)", - "description": "Unexpected keyword argument %r in %s call Used when a function call passes a keyword argument that doesn't correspond to one of the function's parameter names." + "patternId": "E1139", + "title": "invalid-metaclass (E1139)", + "description": "Invalid metaclass %r used Emitted whenever we can detect that a class is using, as a metaclass, something which might be invalid for using as a metaclass." }, { "patternId": "E1141", @@ -1564,40 +1564,50 @@ "description": "Unpacking a dictionary in iteration without calling .items() Emitted when trying to iterate through a dict without calling .items()" }, { - "patternId": "E1135", - "title": "unsupported-membership-test (E1135)", - "description": "Value '%s' doesn't support membership test Emitted when an instance in membership test expression doesn't implement membership protocol (__contains__/__iter__/__getitem__)." + "patternId": "E1142", + "title": "await-outside-async (E1142)", + "description": "'await' should be used within an async function Emitted when await is used outside an async function." }, { - "patternId": "E1136", - "title": "unsubscriptable-object (E1136)", - "description": "Value '%s' is unsubscriptable Emitted when a subscripted value doesn't support subscription (i.e. doesn't define __getitem__ method or __class_getitem__ for a class)." + "patternId": "E1143", + "title": "unhashable-member (E1143)", + "description": "'%s' is unhashable and can't be used as a %s in a %s Emitted when a dict key or set member is not hashable (i.e. doesn't define __hash__ method)." }, { - "patternId": "W1117", - "title": "kwarg-superseded-by-positional-arg (W1117)", - "description": "%r will be included in %r since a positional-only parameter with this name already exists Emitted when a function is called with a keyword argument that has the same name as a positional-only parameter and the function contains a keyword variadic parameter dict." + "patternId": "E1144", + "title": "invalid-slice-step (E1144)", + "description": "Slice step cannot be 0 Used when a slice step is 0 and the object doesn't implement a custom __getitem__ method." + }, + { + "patternId": "E1145", + "title": "async-context-manager-with-regular-with (E1145)", + "description": "Context manager '%s' is async and should be used with 'async with'. Used when an async context manager is used with a regular 'with' statement instead of 'async with'." }, { "patternId": "W1113", "title": "keyword-arg-before-vararg (W1113)", "description": "Keyword argument before variable positional arguments list in the definition of %s function When defining a keyword argument before variable positional arguments, one can end up in having multiple values passed for the aforementioned parameter in case the method is called with keyword arguments." }, - { - "patternId": "W1115", - "title": "non-str-assignment-to-dunder-name (W1115)", - "description": "Non-string value assigned to __name__ Emitted when a non-string value is assigned to __name__" - }, { "patternId": "W1114", "title": "arguments-out-of-order (W1114)", "description": "Positional arguments appear to be out of order Emitted when the caller's argument names fully match the parameter names in the function signature but do not have the same order." }, + { + "patternId": "W1115", + "title": "non-str-assignment-to-dunder-name (W1115)", + "description": "Non-string value assigned to __name__ Emitted when a non-string value is assigned to __name__" + }, { "patternId": "W1116", "title": "isinstance-second-argument-not-valid-type (W1116)", "description": "Second argument of isinstance is not a type Emitted when the second argument of an isinstance call is not a type." }, + { + "patternId": "W1117", + "title": "kwarg-superseded-by-positional-arg (W1117)", + "description": "%r will be included in %r since a positional-only parameter with this name already exists Emitted when a function is called with a keyword argument that has the same name as a positional-only parameter and the function contains a keyword variadic parameter dict." + }, { "patternId": "I1101", "title": "c-extension-no-member (I1101)", @@ -1609,49 +1619,49 @@ "description": "Unnecessary ellipsis constant Used when the ellipsis constant is encountered and can be avoided. A line of code consisting of an ellipsis is unnecessary if there is a docstring on the preceding line or if there is a statement in the same scope." }, { - "patternId": "W2605", - "title": "using-assignment-expression-in-unsupported-version (W2605)", - "description": "Assignment expression is not supported by all versions included in the py-version setting Used when the py-version set by the user is lower than 3.8 and pylint encounters an assignment expression (walrus) operator." + "patternId": "W2601", + "title": "using-f-string-in-unsupported-version (W2601)", + "description": "F-strings are not supported by all versions included in the py-version setting Used when the py-version set by the user is lower than 3.6 and pylint encounters an f-string." + }, + { + "patternId": "W2602", + "title": "using-final-decorator-in-unsupported-version (W2602)", + "description": "typing.final is not supported by all versions included in the py-version setting Used when the py-version set by the user is lower than 3.8 and pylint encounters a typing.final decorator." }, { "patternId": "W2603", "title": "using-exception-groups-in-unsupported-version (W2603)", "description": "Exception groups are not supported by all versions included in the py-version setting Used when the py-version set by the user is lower than 3.11 and pylint encounters except* or ExceptionGroup`." }, - { - "patternId": "W2601", - "title": "using-f-string-in-unsupported-version (W2601)", - "description": "F-strings are not supported by all versions included in the py-version setting Used when the py-version set by the user is lower than 3.6 and pylint encounters an f-string." - }, { "patternId": "W2604", "title": "using-generic-type-syntax-in-unsupported-version (W2604)", "description": "Generic type syntax (PEP 695) is not supported by all versions included in the py-version setting Used when the py-version set by the user is lower than 3.12 and pylint encounters generic type syntax." }, + { + "patternId": "W2605", + "title": "using-assignment-expression-in-unsupported-version (W2605)", + "description": "Assignment expression is not supported by all versions included in the py-version setting Used when the py-version set by the user is lower than 3.8 and pylint encounters an assignment expression (walrus) operator." + }, { "patternId": "W2606", "title": "using-positional-only-args-in-unsupported-version (W2606)", "description": "Positional-only arguments are not supported by all versions included in the py-version setting Used when the py-version set by the user is lower than 3.8 and pylint encounters positional-only arguments." }, { - "patternId": "W2602", - "title": "using-final-decorator-in-unsupported-version (W2602)", - "description": "typing.final is not supported by all versions included in the py-version setting Used when the py-version set by the user is lower than 3.8 and pylint encounters a typing.final decorator." - }, - { - "patternId": "E0633", - "title": "unpacking-non-sequence (E0633)", - "description": "Attempting to unpack a non-sequence%s Used when something which is not a sequence is used in an unpack assignment" + "patternId": "E0601", + "title": "used-before-assignment (E0601)", + "description": "Using variable %r before assignment Emitted when a local variable is accessed before its assignment took place. Assignments in try blocks are assumed not to have occurred when evaluating associated except/finally blocks. Assignments in except blocks are assumed not to have occurred when evaluating statements outside the block, except when the associated try block contains a return statement." }, { - "patternId": "E0605", - "title": "invalid-all-format (E0605)", - "description": "Invalid format for __all__, must be tuple or list Used when __all__ has an invalid format." + "patternId": "E0602", + "title": "undefined-variable (E0602)", + "description": "Undefined variable %r Used when an undefined variable is accessed." }, { - "patternId": "E0643", - "title": "potential-index-error (E0643)", - "description": "Invalid index for iterable length Emitted when an index used on an iterable goes beyond the length of that iterable." + "patternId": "E0603", + "title": "undefined-all-variable (E0603)", + "description": "Undefined variable name %r in __all__ Used when an undefined variable name is referenced in __all__." }, { "patternId": "E0604", @@ -1659,9 +1669,9 @@ "description": "Invalid object %r in __all__, must contain only strings Used when an invalid (non-string) object occurs in __all__." }, { - "patternId": "E0611", - "title": "no-name-in-module (E0611)", - "description": "No name %r in module %r Used when a name cannot be found in a module." + "patternId": "E0605", + "title": "invalid-all-format (E0605)", + "description": "Invalid format for __all__, must be tuple or list Used when __all__ has an invalid format." }, { "patternId": "E0606", @@ -1669,24 +1679,19 @@ "description": "Possibly using variable %r before assignment Emitted when a local variable is accessed before its assignment took place in both branches of an if/else switch." }, { - "patternId": "E0602", - "title": "undefined-variable (E0602)", - "description": "Undefined variable %r Used when an undefined variable is accessed." - }, - { - "patternId": "E0603", - "title": "undefined-all-variable (E0603)", - "description": "Undefined variable name %r in __all__ Used when an undefined variable name is referenced in __all__." + "patternId": "E0611", + "title": "no-name-in-module (E0611)", + "description": "No name %r in module %r Used when a name cannot be found in a module." }, { - "patternId": "E0601", - "title": "used-before-assignment (E0601)", - "description": "Using variable %r before assignment Emitted when a local variable is accessed before its assignment took place. Assignments in try blocks are assumed not to have occurred when evaluating associated except/finally blocks. Assignments in except blocks are assumed not to have occurred when evaluating statements outside the block, except when the associated try block contains a return statement." + "patternId": "E0633", + "title": "unpacking-non-sequence (E0633)", + "description": "Attempting to unpack a non-sequence%s Used when something which is not a sequence is used in an unpack assignment" }, { - "patternId": "W0640", - "title": "cell-var-from-loop (W0640)", - "description": "Cell variable %s defined in loop A variable used in a closure is defined in a loop. This will result in all closures using the same value for the closed-over variable." + "patternId": "E0643", + "title": "potential-index-error (E0643)", + "description": "Invalid index for iterable length Emitted when an index used on an iterable goes beyond the length of that iterable." }, { "patternId": "W0601", @@ -1694,40 +1699,30 @@ "description": "Global variable %r undefined at the module level Used when a variable is defined through the \"global\" statement but the variable is not defined in the module scope." }, { - "patternId": "W0642", - "title": "self-cls-assignment (W0642)", - "description": "Invalid assignment to %s in method Invalid assignment to self or cls in instance or class method respectively." - }, - { - "patternId": "W0644", - "title": "unbalanced-dict-unpacking (W0644)", - "description": "Possible unbalanced dict unpacking with %s: left side has %d label%s, right side has %d value%s Used when there is an unbalanced dict unpacking in assignment or for loop" - }, - { - "patternId": "W0632", - "title": "unbalanced-tuple-unpacking (W0632)", - "description": "Possible unbalanced tuple unpacking with sequence %s: left side has %d label%s, right side has %d value%s Used when there is an unbalanced tuple unpacking in assignment" - }, - { - "patternId": "W0641", - "title": "possibly-unused-variable (W0641)", - "description": "Possibly unused variable %r Used when a variable is defined but might not be used. The possibility comes from the fact that locals() might be used, which could consume or not the said variable" + "patternId": "W0602", + "title": "global-variable-not-assigned (W0602)", + "description": "Using global for %r but no assignment is done When a variable defined in the global scope is modified in an inner scope, the 'global' keyword is required in the inner scope only if there is an assignment operation done in the inner scope." }, { - "patternId": "W0622", - "title": "redefined-builtin (W0622)", - "description": "Redefining built-in %r Used when a variable or function override a built-in." + "patternId": "W0603", + "title": "global-statement (W0603)", + "description": "Using the global statement Used when you use the \"global\" statement to update a global variable. Pylint discourages its usage. That doesn't mean you cannot use it!" }, { - "patternId": "W0621", - "title": "redefined-outer-name (W0621)", - "description": "Redefining name %r from outer scope (line %s) Used when a variable's name hides a name defined in an outer scope or except handler." + "patternId": "W0604", + "title": "global-at-module-level (W0604)", + "description": "Using the global statement at the module level Used when you use the \"global\" statement at the module level since it has no effect." }, { "patternId": "W0611", "title": "unused-import (W0611)", "description": "Unused %s Used when an imported module or variable is not used." }, + { + "patternId": "W0612", + "title": "unused-variable (W0612)", + "description": "Unused variable %r Used when a variable is defined but not used." + }, { "patternId": "W0613", "title": "unused-argument (W0613)", @@ -1739,14 +1734,14 @@ "description": "Unused import(s) %s from wildcard import of %s Used when an imported module or variable is not used from a 'from X import *' style import." }, { - "patternId": "W0612", - "title": "unused-variable (W0612)", - "description": "Unused variable %r Used when a variable is defined but not used." + "patternId": "W0621", + "title": "redefined-outer-name (W0621)", + "description": "Redefining name %r from outer scope (line %s) Used when a variable's name hides a name defined in an outer scope or except handler." }, { - "patternId": "W0602", - "title": "global-variable-not-assigned (W0602)", - "description": "Using global for %r but no assignment is done When a variable defined in the global scope is modified in an inner scope, the 'global' keyword is required in the inner scope only if there is an assignment operation done in the inner scope." + "patternId": "W0622", + "title": "redefined-builtin (W0622)", + "description": "Redefining built-in %r Used when a variable or function override a built-in." }, { "patternId": "W0631", @@ -1754,13 +1749,28 @@ "description": "Using possibly undefined loop variable %r Used when a loop variable (i.e. defined by a for loop or a list comprehension or a generator expression) is used outside the loop." }, { - "patternId": "W0603", - "title": "global-statement (W0603)", - "description": "Using the global statement Used when you use the \"global\" statement to update a global variable. Pylint discourages its usage. That doesn't mean you cannot use it!" + "patternId": "W0632", + "title": "unbalanced-tuple-unpacking (W0632)", + "description": "Possible unbalanced tuple unpacking with sequence %s: left side has %d label%s, right side has %d value%s Used when there is an unbalanced tuple unpacking in assignment" }, { - "patternId": "W0604", - "title": "global-at-module-level (W0604)", - "description": "Using the global statement at the module level Used when you use the \"global\" statement at the module level since it has no effect." + "patternId": "W0640", + "title": "cell-var-from-loop (W0640)", + "description": "Cell variable %s defined in loop A variable used in a closure is defined in a loop. This will result in all closures using the same value for the closed-over variable." + }, + { + "patternId": "W0641", + "title": "possibly-unused-variable (W0641)", + "description": "Possibly unused variable %r Used when a variable is defined but might not be used. The possibility comes from the fact that locals() might be used, which could consume or not the said variable" + }, + { + "patternId": "W0642", + "title": "self-cls-assignment (W0642)", + "description": "Invalid assignment to %s in method Invalid assignment to self or cls in instance or class method respectively." + }, + { + "patternId": "W0644", + "title": "unbalanced-dict-unpacking (W0644)", + "description": "Possible unbalanced dict unpacking with %s: left side has %d label%s, right side has %d value%s Used when there is an unbalanced dict unpacking in assignment or for loop" } ] diff --git a/docs/patterns.json b/docs/patterns.json index 0c85cf2..693b7ed 100644 --- a/docs/patterns.json +++ b/docs/patterns.json @@ -1,75 +1,75 @@ { "name": "pylintpython3", - "version": "3.3.9", + "version": "4.0.5", "patterns": [ { - "patternId": "E0103", + "patternId": "E0100", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0102", + "patternId": "E0101", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0116", + "patternId": "E0102", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0110", + "patternId": "E0103", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0114", + "patternId": "E0104", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0108", + "patternId": "E0105", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0101", + "patternId": "E0106", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0112", + "patternId": "E0107", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0115", + "patternId": "E0108", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0118", + "patternId": "E0110", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E0104", + "patternId": "E0111", "level": "Error", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "E0106", + "patternId": "E0112", "level": "Error", "category": "CodeStyle", "enabled": true @@ -81,28 +81,28 @@ "enabled": true }, { - "patternId": "E0111", + "patternId": "E0114", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E0107", + "patternId": "E0115", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0105", + "patternId": "E0117", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0100", + "patternId": "E0118", "level": "Error", "category": "CodeStyle", - "enabled": true + "enabled": false }, { "patternId": "E0119", @@ -111,124 +111,132 @@ "enabled": false }, { - "patternId": "E0117", - "level": "Error", + "patternId": "W0101", + "level": "Warning", "category": "CodeStyle", "enabled": true }, { - "patternId": "W0150", + "patternId": "W0102", "level": "Warning", "category": "CodeStyle", "enabled": true }, { - "patternId": "W0134", + "patternId": "W0104", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "W0199", + "patternId": "W0105", "level": "Warning", "category": "CodeStyle", "enabled": true }, { - "patternId": "W0129", + "patternId": "W0106", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "W0127", + "patternId": "W0107", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "W0143", + "patternId": "W0108", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "W0177", + "patternId": "W0109", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "W0102", + "patternId": "W0120", "level": "Warning", "category": "CodeStyle", "enabled": true }, { - "patternId": "W0109", + "patternId": "W0122", "level": "Warning", - "category": "CodeStyle", - "enabled": true + "category": "Security", + "enabled": true, + "subcategory": "CommandInjection" }, { - "patternId": "W0130", + "patternId": "W0123", "level": "Warning", - "category": "CodeStyle", - "enabled": false + "category": "Security", + "enabled": false, + "subcategory": "CommandInjection" }, { - "patternId": "W0120", + "patternId": "W0124", "level": "Warning", "category": "CodeStyle", "enabled": true }, { - "patternId": "W0133", + "patternId": "W0125", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0106", + "patternId": "W0126", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W0124", + "patternId": "W0127", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W0108", + "patternId": "W0128", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W0131", + "patternId": "W0129", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0128", + "patternId": "W0130", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0104", + "patternId": "W0131", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W0105", + "patternId": "W0133", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false + }, + { + "patternId": "W0134", + "level": "Warning", + "category": "CodeStyle", + "enabled": false }, { "patternId": "W0135", @@ -237,57 +245,55 @@ "enabled": false }, { - "patternId": "W0107", + "patternId": "W0136", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W0101", + "patternId": "W0137", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W0123", + "patternId": "W0143", "level": "Warning", - "category": "Security", - "enabled": false, - "subcategory": "CommandInjection" + "category": "CodeStyle", + "enabled": false }, { - "patternId": "W0122", + "patternId": "W0150", "level": "Warning", - "category": "Security", - "enabled": true, - "subcategory": "CommandInjection" + "category": "CodeStyle", + "enabled": true }, { - "patternId": "W0125", + "patternId": "W0177", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0126", + "patternId": "W0199", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "R0133", + "patternId": "R0123", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R0123", + "patternId": "R0124", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R0124", + "patternId": "R0133", "level": "Info", "category": "CodeStyle", "enabled": false @@ -341,13 +347,13 @@ ] }, { - "patternId": "C0121", + "patternId": "C0104", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0104", + "patternId": "C0105", "level": "Info", "category": "CodeStyle", "enabled": false @@ -358,6 +364,12 @@ "category": "CodeStyle", "enabled": false }, + { + "patternId": "C0114", + "level": "Info", + "category": "CodeStyle", + "enabled": false + }, { "patternId": "C0115", "level": "Info", @@ -371,16 +383,16 @@ "enabled": false }, { - "patternId": "C0114", + "patternId": "C0121", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0105", + "patternId": "C0123", "level": "Info", "category": "CodeStyle", - "enabled": false + "enabled": true }, { "patternId": "C0131", @@ -395,8 +407,8 @@ "enabled": false }, { - "patternId": "C0123", - "level": "Info", + "patternId": "E0202", + "level": "Error", "category": "CodeStyle", "enabled": true }, @@ -407,31 +419,31 @@ "enabled": true }, { - "patternId": "E0202", + "patternId": "E0211", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0237", + "patternId": "E0213", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0241", + "patternId": "E0236", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0244", + "patternId": "E0237", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0240", + "patternId": "E0238", "level": "Error", "category": "CodeStyle", "enabled": true @@ -443,31 +455,31 @@ "enabled": true }, { - "patternId": "E0238", + "patternId": "E0240", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0243", + "patternId": "E0241", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E0236", + "patternId": "E0242", "level": "Error", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "E0211", + "patternId": "E0243", "level": "Error", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "E0213", + "patternId": "E0244", "level": "Error", "category": "CodeStyle", "enabled": false @@ -479,97 +491,91 @@ "enabled": false }, { - "patternId": "E0302", + "patternId": "E0301", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0242", + "patternId": "E0302", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E0304", + "patternId": "E0303", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0308", + "patternId": "E0304", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0311", + "patternId": "E0305", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0312", + "patternId": "E0306", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0313", + "patternId": "E0307", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0309", + "patternId": "E0308", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0305", + "patternId": "E0309", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0301", - "level": "Error", - "category": "CodeStyle", - "enabled": true - }, - { - "patternId": "E0303", + "patternId": "E0310", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0310", + "patternId": "E0311", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0306", + "patternId": "E0312", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0307", + "patternId": "E0313", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0221", + "patternId": "W0201", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W0237", + "patternId": "W0211", "level": "Warning", "category": "CodeStyle", "enabled": false @@ -581,22 +587,22 @@ "enabled": false }, { - "patternId": "W0201", + "patternId": "W0213", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0240", + "patternId": "W0221", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "W0213", + "patternId": "W0222", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { "patternId": "W0223", @@ -605,97 +611,97 @@ "enabled": false }, { - "patternId": "W0239", + "patternId": "W0231", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0236", + "patternId": "W0233", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "W0244", + "patternId": "W0236", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0222", + "patternId": "W0237", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W0211", + "patternId": "W0238", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0245", + "patternId": "W0239", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0238", + "patternId": "W0240", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0246", + "patternId": "W0244", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0233", + "patternId": "W0245", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W0231", + "patternId": "W0246", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "R0206", + "patternId": "R0202", "level": "Info", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "R0205", + "patternId": "R0203", "level": "Info", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "R0202", + "patternId": "R0205", "level": "Info", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "R0203", + "patternId": "R0206", "level": "Info", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "C0205", + "patternId": "C0202", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0202", + "patternId": "C0203", "level": "Info", "category": "CodeStyle", "enabled": false @@ -707,7 +713,7 @@ "enabled": false }, { - "patternId": "C0203", + "patternId": "C0205", "level": "Info", "category": "CodeStyle", "enabled": false @@ -719,25 +725,31 @@ "enabled": false }, { - "patternId": "R0903", + "patternId": "R0901", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R0901", + "patternId": "R0902", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R0913", + "patternId": "R0903", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R0916", + "patternId": "R0904", + "level": "Info", + "category": "CodeStyle", + "enabled": false + }, + { + "patternId": "R0911", "level": "Info", "category": "CodeStyle", "enabled": false @@ -749,7 +761,7 @@ "enabled": false }, { - "patternId": "R0902", + "patternId": "R0913", "level": "Info", "category": "CodeStyle", "enabled": false @@ -767,37 +779,37 @@ ] }, { - "patternId": "R0917", + "patternId": "R0915", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R0904", + "patternId": "R0916", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R0911", + "patternId": "R0917", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R0915", - "level": "Info", + "patternId": "E0701", + "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E0701", + "patternId": "E0702", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0712", + "patternId": "E0704", "level": "Error", "category": "CodeStyle", "enabled": true @@ -809,26 +821,26 @@ "enabled": false }, { - "patternId": "E0711", + "patternId": "E0710", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0702", + "patternId": "E0711", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0710", + "patternId": "E0712", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E0704", - "level": "Error", + "patternId": "W0702", + "level": "Warning", "category": "CodeStyle", "enabled": true }, @@ -839,7 +851,7 @@ "enabled": true }, { - "patternId": "W0718", + "patternId": "W0706", "level": "Warning", "category": "CodeStyle", "enabled": false @@ -850,12 +862,6 @@ "category": "CodeStyle", "enabled": false }, - { - "patternId": "W0715", - "level": "Warning", - "category": "CodeStyle", - "enabled": false - }, { "patternId": "W0711", "level": "Warning", @@ -863,31 +869,25 @@ "enabled": true }, { - "patternId": "W0716", + "patternId": "W0715", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0702", - "level": "Warning", - "category": "CodeStyle", - "enabled": true - }, - { - "patternId": "W0719", + "patternId": "W0716", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0706", + "patternId": "W0718", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0311", + "patternId": "W0719", "level": "Warning", "category": "CodeStyle", "enabled": false @@ -899,8 +899,8 @@ "enabled": false }, { - "patternId": "C0304", - "level": "Info", + "patternId": "W0311", + "level": "Warning", "category": "CodeStyle", "enabled": false }, @@ -917,19 +917,19 @@ ] }, { - "patternId": "C0327", + "patternId": "C0302", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0321", + "patternId": "C0303", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0302", + "patternId": "C0304", "level": "Info", "category": "CodeStyle", "enabled": false @@ -941,19 +941,25 @@ "enabled": false }, { - "patternId": "C0303", + "patternId": "C0321", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0328", + "patternId": "C0325", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0325", + "patternId": "C0327", + "level": "Info", + "category": "CodeStyle", + "enabled": false + }, + { + "patternId": "C0328", "level": "Info", "category": "CodeStyle", "enabled": false @@ -965,11 +971,17 @@ "enabled": false }, { - "patternId": "W4901", + "patternId": "W0401", "level": "Warning", "category": "CodeStyle", "enabled": false }, + { + "patternId": "W0404", + "level": "Warning", + "category": "CodeStyle", + "enabled": true + }, { "patternId": "W0406", "level": "Warning", @@ -983,7 +995,7 @@ "enabled": false }, { - "patternId": "W0404", + "patternId": "W0410", "level": "Warning", "category": "CodeStyle", "enabled": true @@ -995,17 +1007,11 @@ "enabled": false }, { - "patternId": "W0401", + "patternId": "W4901", "level": "Warning", "category": "CodeStyle", "enabled": false }, - { - "patternId": "W0410", - "level": "Warning", - "category": "CodeStyle", - "enabled": true - }, { "patternId": "R0401", "level": "Info", @@ -1019,37 +1025,37 @@ "enabled": false }, { - "patternId": "C0411", + "patternId": "C0410", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0413", + "patternId": "C0411", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0414", + "patternId": "C0412", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0415", + "patternId": "C0413", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0412", + "patternId": "C0414", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0410", + "patternId": "C0415", "level": "Info", "category": "CodeStyle", "enabled": false @@ -1067,13 +1073,13 @@ "enabled": false }, { - "patternId": "E1201", + "patternId": "E1200", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E1206", + "patternId": "E1201", "level": "Error", "category": "CodeStyle", "enabled": true @@ -1085,25 +1091,25 @@ "enabled": true }, { - "patternId": "E1200", + "patternId": "E1206", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "W1202", + "patternId": "W1201", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1203", + "patternId": "W1202", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1201", + "patternId": "W1203", "level": "Warning", "category": "CodeStyle", "enabled": false @@ -1145,268 +1151,268 @@ "enabled": true }, { - "patternId": "R1726", + "patternId": "R1701", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1727", + "patternId": "R1702", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1709", + "patternId": "R1703", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1714", + "patternId": "R1704", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1701", + "patternId": "R1705", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1735", + "patternId": "R1706", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1731", + "patternId": "R1707", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1730", + "patternId": "R1708", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1722", + "patternId": "R1709", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1732", + "patternId": "R1710", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1725", + "patternId": "R1711", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1734", + "patternId": "R1712", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1717", + "patternId": "R1713", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1728", + "patternId": "R1714", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1718", + "patternId": "R1715", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1715", + "patternId": "R1716", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1713", + "patternId": "R1717", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1706", + "patternId": "R1718", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1712", + "patternId": "R1719", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1707", + "patternId": "R1720", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1708", + "patternId": "R1721", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1710", + "patternId": "R1722", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1704", + "patternId": "R1723", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1716", + "patternId": "R1724", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1719", + "patternId": "R1725", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1703", + "patternId": "R1726", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1702", + "patternId": "R1727", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1723", + "patternId": "R1728", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1724", + "patternId": "R1729", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1720", + "patternId": "R1730", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1705", + "patternId": "R1731", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1733", + "patternId": "R1732", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1736", + "patternId": "R1733", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1721", + "patternId": "R1734", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1737", + "patternId": "R1735", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1729", + "patternId": "R1736", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "R1711", + "patternId": "R1737", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C1803", + "patternId": "C0117", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C1804", + "patternId": "C0200", "level": "Info", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "C1805", + "patternId": "C0201", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0117", + "patternId": "C0206", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0201", + "patternId": "C0207", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0206", + "patternId": "C0208", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0200", + "patternId": "C0209", "level": "Info", "category": "CodeStyle", - "enabled": true + "enabled": false }, { "patternId": "C1802", @@ -1415,19 +1421,19 @@ "enabled": false }, { - "patternId": "C0209", + "patternId": "C1803", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0207", + "patternId": "C1804", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0208", + "patternId": "C1805", "level": "Info", "category": "CodeStyle", "enabled": false @@ -1439,19 +1445,19 @@ "enabled": false }, { - "patternId": "C0403", + "patternId": "C0401", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0401", + "patternId": "C0402", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C0402", + "patternId": "C0403", "level": "Info", "category": "CodeStyle", "enabled": false @@ -1481,67 +1487,61 @@ "enabled": false }, { - "patternId": "W1508", - "level": "Warning", - "category": "CodeStyle", - "enabled": false - }, - { - "patternId": "W1518", + "patternId": "W1502", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1510", + "patternId": "W1503", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1515", + "patternId": "W1506", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1503", + "patternId": "W1507", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1507", + "patternId": "W1508", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1502", + "patternId": "W1509", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W4903", + "patternId": "W1510", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W4906", + "patternId": "W1514", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W4904", + "patternId": "W1515", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W4905", + "patternId": "W1518", "level": "Warning", "category": "CodeStyle", "enabled": false @@ -1553,31 +1553,31 @@ "enabled": false }, { - "patternId": "W1514", + "patternId": "W4903", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1509", + "patternId": "W4904", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1506", + "patternId": "W4905", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "E1307", - "level": "Error", + "patternId": "W4906", + "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "E1303", + "patternId": "E1300", "level": "Error", "category": "CodeStyle", "enabled": true @@ -1589,79 +1589,79 @@ "enabled": true }, { - "patternId": "E1304", + "patternId": "E1302", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E1302", + "patternId": "E1303", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E1306", + "patternId": "E1304", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E1310", + "patternId": "E1305", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E1305", + "patternId": "E1306", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E1300", + "patternId": "E1307", "level": "Error", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W1402", - "level": "Warning", + "patternId": "E1310", + "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1401", + "patternId": "W1300", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "W1308", + "patternId": "W1301", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "W1305", + "patternId": "W1302", "level": "Warning", "category": "CodeStyle", "enabled": true }, { - "patternId": "W1300", + "patternId": "W1303", "level": "Warning", "category": "CodeStyle", "enabled": true }, { - "patternId": "W1404", + "patternId": "W1304", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1302", + "patternId": "W1305", "level": "Warning", "category": "CodeStyle", "enabled": true @@ -1673,52 +1673,58 @@ "enabled": true }, { - "patternId": "W1303", + "patternId": "W1307", "level": "Warning", "category": "CodeStyle", "enabled": true }, { - "patternId": "W1405", + "patternId": "W1308", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1406", + "patternId": "W1309", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1304", + "patternId": "W1310", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1301", + "patternId": "W1401", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W1309", + "patternId": "W1402", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1310", + "patternId": "W1404", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1307", + "patternId": "W1405", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false + }, + { + "patternId": "W1406", + "level": "Warning", + "category": "CodeStyle", + "enabled": false }, { "patternId": "W2101", @@ -1727,61 +1733,61 @@ "enabled": false }, { - "patternId": "E1137", + "patternId": "E1101", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E1138", + "patternId": "E1102", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E1130", + "patternId": "E1111", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E1131", + "patternId": "E1120", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E1101", + "patternId": "E1121", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E1102", + "patternId": "E1123", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E1143", + "patternId": "E1124", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E1142", + "patternId": "E1125", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E1124", + "patternId": "E1126", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E1111", + "patternId": "E1127", "level": "Error", "category": "CodeStyle", "enabled": true @@ -1799,92 +1805,92 @@ "enabled": false }, { - "patternId": "E1132", + "patternId": "E1130", "level": "Error", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "E1139", + "patternId": "E1131", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E1125", + "patternId": "E1132", "level": "Error", "category": "CodeStyle", "enabled": true }, { - "patternId": "E1120", + "patternId": "E1133", "level": "Error", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "E1133", + "patternId": "E1134", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E1134", + "patternId": "E1135", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E1126", + "patternId": "E1136", "level": "Error", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "E1127", + "patternId": "E1137", "level": "Error", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "E1144", + "patternId": "E1138", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E1121", + "patternId": "E1139", "level": "Error", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "E1123", + "patternId": "E1141", "level": "Error", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "E1141", + "patternId": "E1142", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E1135", + "patternId": "E1143", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E1136", + "patternId": "E1144", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1117", - "level": "Warning", + "patternId": "E1145", + "level": "Error", "category": "CodeStyle", "enabled": false }, @@ -1895,13 +1901,13 @@ "enabled": false }, { - "patternId": "W1115", + "patternId": "W1114", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W1114", + "patternId": "W1115", "level": "Warning", "category": "CodeStyle", "enabled": false @@ -1912,6 +1918,12 @@ "category": "CodeStyle", "enabled": false }, + { + "patternId": "W1117", + "level": "Warning", + "category": "CodeStyle", + "enabled": false + }, { "patternId": "I1101", "level": "Warning", @@ -1925,19 +1937,19 @@ "enabled": false }, { - "patternId": "W2605", + "patternId": "W2601", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W2603", + "patternId": "W2602", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W2601", + "patternId": "W2603", "level": "Warning", "category": "CodeStyle", "enabled": false @@ -1949,34 +1961,34 @@ "enabled": false }, { - "patternId": "W2606", + "patternId": "W2605", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W2602", + "patternId": "W2606", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0633", + "patternId": "E0601", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "E0605", + "patternId": "E0602", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0643", + "patternId": "E0603", "level": "Error", "category": "CodeStyle", - "enabled": false + "enabled": true }, { "patternId": "E0604", @@ -1985,7 +1997,7 @@ "enabled": true }, { - "patternId": "E0611", + "patternId": "E0605", "level": "Error", "category": "CodeStyle", "enabled": false @@ -1997,27 +2009,21 @@ "enabled": false }, { - "patternId": "E0602", + "patternId": "E0611", "level": "Error", "category": "CodeStyle", "enabled": false }, { - "patternId": "E0603", + "patternId": "E0633", "level": "Error", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "E0601", + "patternId": "E0643", "level": "Error", "category": "CodeStyle", - "enabled": true - }, - { - "patternId": "W0640", - "level": "Warning", - "category": "CodeStyle", "enabled": false }, { @@ -2027,88 +2033,94 @@ "enabled": true }, { - "patternId": "W0642", + "patternId": "W0602", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "W0644", + "patternId": "W0603", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0632", + "patternId": "W0604", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "W0641", + "patternId": "W0611", "level": "Warning", "category": "CodeStyle", - "enabled": false + "enabled": true }, { - "patternId": "W0622", + "patternId": "W0612", "level": "Warning", "category": "CodeStyle", "enabled": true }, { - "patternId": "W0621", + "patternId": "W0613", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0611", + "patternId": "W0614", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W0613", + "patternId": "W0621", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0614", + "patternId": "W0622", + "level": "Warning", + "category": "CodeStyle", + "enabled": true + }, + { + "patternId": "W0631", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0612", + "patternId": "W0632", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W0602", + "patternId": "W0640", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false }, { - "patternId": "W0631", + "patternId": "W0641", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0603", + "patternId": "W0642", "level": "Warning", "category": "CodeStyle", "enabled": false }, { - "patternId": "W0604", + "patternId": "W0644", "level": "Warning", "category": "CodeStyle", - "enabled": true + "enabled": false } ] } diff --git a/requirements.txt b/requirements.txt index a0de064..03e8220 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,12 @@ -pylint==3.3.9 -Django==5.2.6 -pylint-django==2.6.1 -Flask==3.1.2 +pylint==4.0.5 +Django==6.0.4 +pylint-django==2.7.0 +Flask==3.1.3 pylint-flask==0.6 pylint-common==0.2.5 pylint-celery==0.3 SaltPyLint==2024.2.5 jsonpickle==4.1.1 -asttokens==3.0.0 +asttokens==3.0.1 pylint-beam==0.1.2 pylint-pytest==1.1.8 \ No newline at end of file From f1b84e2a4c1a24431eb7850a406a4ce006791e24 Mon Sep 17 00:00:00 2001 From: DMarinhoCodacy Date: Mon, 13 Apr 2026 12:49:07 +0100 Subject: [PATCH 2/2] fix issue running with config file --- src/codacy_pylint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codacy_pylint.py b/src/codacy_pylint.py index 6102426..f3bb587 100644 --- a/src/codacy_pylint.py +++ b/src/codacy_pylint.py @@ -206,7 +206,7 @@ def allFiles(): return walkDirectory(srcDir) configuration = readJsonFile(configFile) files = configuration.get('files') or allFiles() tools = [t for t in configuration['tools'] if t['name'] == 'pylintpython3'] - if tools and 'patterns' in tools[0]: + if tools and tools[0].get('patterns'): pylint = tools[0] rules = ['--disable=all', '--enable=' + ','.join([p['patternId'] for p in pylint.get('patterns') or []])] rcfile = pyconfigString(parametersFromJson(pylint))