From e343590e7d59b4bfd6bc4913ac20ac9c46e702a4 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 16 May 2024 19:27:34 -0400 Subject: [PATCH] pylint: ignore possibly/used-before-assignment as it is prone to FP It does no control flow analysis, and upgrading to pylint 3.2.0 produced many incorrect warnings. Also ignore contextmanager-generator-missing-cleanup for now. It has FP when there is no code after a yield (and thus no cleanup needs to be handled), which is what we do. Currently under discussion upstream: https://github.com/pylint-dev/pylint/issues/9625 --- .pylintrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.pylintrc b/.pylintrc index b457544a6..64316fe6e 100644 --- a/.pylintrc +++ b/.pylintrc @@ -17,6 +17,7 @@ disable= cell-var-from-loop, consider-using-f-string, consider-using-with, + contextmanager-generator-missing-cleanup, cyclic-import, deprecated-decorator, duplicate-code, @@ -47,6 +48,7 @@ disable= not-an-iterable, not-callable, pointless-string-statement, + possibly-used-before-assignment, protected-access, raise-missing-from, redeclared-assigned-name, @@ -75,6 +77,7 @@ disable= unsubscriptable-object, unused-argument, unused-variable, + used-before-assignment, useless-super-delegation, wrong-import-order, wrong-import-position,