diff --git a/docs/description/C1804.md b/docs/description/C1804.md index 4c3b810..a87b936 100644 --- a/docs/description/C1804.md +++ b/docs/description/C1804.md @@ -1,6 +1,6 @@ # use-implicit-booleaness-not-comparison-to-string (C1804) -"%s" can be simplified to "%s", if it is striclty a string, as an empty +"%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 diff --git a/docs/description/E0108.md b/docs/description/E0108.md index b020ded..5a2303a 100644 --- a/docs/description/E0108.md +++ b/docs/description/E0108.md @@ -1,4 +1,4 @@ # duplicate-argument-name (E0108) -Duplicate argument name %s in function definition Duplicate argument +Duplicate argument name %r in function definition Duplicate argument names in function definitions are syntax errors. diff --git a/docs/description/E0245.md b/docs/description/E0245.md new file mode 100644 index 0000000..0d233ba --- /dev/null +++ b/docs/description/E0245.md @@ -0,0 +1,5 @@ +# declare-non-slot (E0245) + +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. diff --git a/docs/description/E0710.md b/docs/description/E0710.md index b10a0d3..cb181d6 100644 --- a/docs/description/E0710.md +++ b/docs/description/E0710.md @@ -1,5 +1,4 @@ # raising-non-exception (E0710) -Raising a new style class which doesn't inherit from BaseException Used -when a new style class which doesn't inherit from BaseException is -raised. +Raising a class which doesn't inherit from BaseException Used when a +class which doesn't inherit from BaseException is raised. diff --git a/docs/description/R0917.md b/docs/description/R0917.md index 2f48167..a3a530e 100644 --- a/docs/description/R0917.md +++ b/docs/description/R0917.md @@ -1,6 +1,4 @@ -# too-many-positional (R0917) +# too-many-positional-arguments (R0917) -Too many positional arguments in a function call. Will be implemented in -https://github.com/pylint- dev/pylint/issues/9099,msgid/symbol pair -reserved for compatibility with ruff, see -https://github.com/astral-sh/ruff/issues/8946. +Too many positional arguments (%s/%s) Used when a function has too many +positional arguments. diff --git a/docs/description/W0212.md b/docs/description/W0212.md index 8572de9..39fe52f 100644 --- a/docs/description/W0212.md +++ b/docs/description/W0212.md @@ -2,5 +2,5 @@ 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 -access outside the class or a descendant of the class where it's +accessed outside the class or a descendant of the class where it's defined. diff --git a/docs/description/W2603.md b/docs/description/W2603.md new file mode 100644 index 0000000..46324d6 --- /dev/null +++ b/docs/description/W2603.md @@ -0,0 +1,5 @@ +# using-exception-groups-in-unsupported-version (W2603) + +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\`. diff --git a/docs/description/W2604.md b/docs/description/W2604.md new file mode 100644 index 0000000..1c9e9c7 --- /dev/null +++ b/docs/description/W2604.md @@ -0,0 +1,5 @@ +# using-generic-type-syntax-in-unsupported-version (W2604) + +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. diff --git a/docs/description/W2605.md b/docs/description/W2605.md new file mode 100644 index 0000000..e35b2b2 --- /dev/null +++ b/docs/description/W2605.md @@ -0,0 +1,6 @@ +# using-assignment-expression-in-unsupported-version (W2605) + +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. diff --git a/docs/description/W2606.md b/docs/description/W2606.md new file mode 100644 index 0000000..1728099 --- /dev/null +++ b/docs/description/W2606.md @@ -0,0 +1,5 @@ +# using-positional-only-args-in-unsupported-version (W2606) + +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. diff --git a/docs/description/description.json b/docs/description/description.json index c3b9e52..f574b7d 100644 --- a/docs/description/description.json +++ b/docs/description/description.json @@ -27,7 +27,7 @@ { "patternId": "E0108", "title": "duplicate-argument-name (E0108)", - "description": "Duplicate argument name %s in function definition Duplicate argument names in function definitions are syntax errors." + "description": "Duplicate argument name %r in function definition Duplicate argument names in function definitions are syntax errors." }, { "patternId": "E0101", @@ -396,6 +396,11 @@ "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": "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": "E0302", "title": "unexpected-special-method-signature (E0302)", @@ -479,7 +484,7 @@ { "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 access outside the class or a descendant of the class where it's defined." + "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": "W0201", @@ -639,8 +644,8 @@ }, { "patternId": "R0917", - "title": "too-many-positional (R0917)", - "description": "Too many positional arguments in a function call. Will be implemented in https://github.com/pylint- dev/pylint/issues/9099,msgid/symbol pair reserved for compatibility with ruff, see https://github.com/astral-sh/ruff/issues/8946." + "title": "too-many-positional-arguments (R0917)", + "description": "Too many positional arguments (%s/%s) Used when a function has too many positional arguments." }, { "patternId": "R0904", @@ -685,7 +690,7 @@ { "patternId": "E0710", "title": "raising-non-exception (E0710)", - "description": "Raising a new style class which doesn't inherit from BaseException Used when a new style class which doesn't inherit from BaseException is raised." + "description": "Raising a class which doesn't inherit from BaseException Used when a class which doesn't inherit from BaseException is raised." }, { "patternId": "E0704", @@ -1138,16 +1143,16 @@ "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": "C1804", - "title": "use-implicit-booleaness-not-comparison-to-string (C1804)", - "description": "\"%s\" can be simplified to \"%s\", if it is striclty 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": "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)", @@ -1603,11 +1608,31 @@ "title": "unnecessary-ellipsis (W2301)", "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": "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": "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)", diff --git a/docs/patterns.json b/docs/patterns.json index 0d039a8..19f3943 100644 --- a/docs/patterns.json +++ b/docs/patterns.json @@ -1,6 +1,6 @@ { "name": "pylintpython3", - "version": "3.2.6", + "version": "3.3.1", "patterns": [ { "patternId": "E0103", @@ -472,6 +472,12 @@ "category": "CodeStyle", "enabled": false }, + { + "patternId": "E0245", + "level": "Error", + "category": "CodeStyle", + "enabled": false + }, { "patternId": "E0302", "level": "Error", @@ -1361,13 +1367,13 @@ "enabled": false }, { - "patternId": "C1804", + "patternId": "C1803", "level": "Info", "category": "CodeStyle", "enabled": false }, { - "patternId": "C1803", + "patternId": "C1804", "level": "Info", "category": "CodeStyle", "enabled": false @@ -1918,12 +1924,36 @@ "category": "CodeStyle", "enabled": false }, + { + "patternId": "W2605", + "level": "Warning", + "category": "CodeStyle", + "enabled": false + }, + { + "patternId": "W2603", + "level": "Warning", + "category": "CodeStyle", + "enabled": false + }, { "patternId": "W2601", "level": "Warning", "category": "CodeStyle", "enabled": false }, + { + "patternId": "W2604", + "level": "Warning", + "category": "CodeStyle", + "enabled": false + }, + { + "patternId": "W2606", + "level": "Warning", + "category": "CodeStyle", + "enabled": false + }, { "patternId": "W2602", "level": "Warning", diff --git a/requirements.txt b/requirements.txt index c9035cb..bc6136d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,12 @@ -pylint==3.2.6 -Django==5.1 +pylint==3.3.1 +Django==5.1.1 pylint-django==2.5.5 Flask==3.0.3 pylint-flask==0.6 pylint-common==0.2.5 pylint-celery==0.3 SaltPyLint==2024.2.5 -jsonpickle==3.0.3 +jsonpickle==3.3.0 asttokens==2.4.1 pylint-beam==0.1.2 -pylint-pytest==1.1.7 \ No newline at end of file +pylint-pytest==1.1.8 \ No newline at end of file