@@ -280,13 +280,13 @@ public class IgnoredPureOperationsCheck extends PythonSubscriptionCheck {
280280 ));
281281 }
282282
283- private static Map <String , TypeCheckBuilder > pureFunctionsCheckers = null ;
284- private static Set <TypeCheckBuilder > pureGetitemTypesCheckers = null ;
285- private static Set <TypeCheckBuilder > pureContainsTypesCheckers = null ;
283+ private Map <String , TypeCheckBuilder > pureFunctionsCheckers = null ;
284+ private Set <TypeCheckBuilder > pureGetitemTypesCheckers = null ;
285+ private Set <TypeCheckBuilder > pureContainsTypesCheckers = null ;
286286
287287 @ Override
288288 public void initialize (Context context ) {
289- context .registerSyntaxNodeConsumer (Tree .Kind .FILE_INPUT , IgnoredPureOperationsCheck ::resetTypeCheckers );
289+ context .registerSyntaxNodeConsumer (Tree .Kind .FILE_INPUT , this ::resetTypeCheckers );
290290 context .registerSyntaxNodeConsumer (Tree .Kind .EXPRESSION_STMT , ctx -> {
291291 ExpressionStatement expressionStatement = (ExpressionStatement ) ctx .syntaxNode ();
292292 if (TreeUtils .firstAncestor (expressionStatement , IgnoredPureOperationsCheck ::isInTryBlock ) != null ) {
@@ -297,13 +297,13 @@ public void initialize(Context context) {
297297 });
298298 }
299299
300- private static void resetTypeCheckers (SubscriptionContext ctx ) {
300+ private void resetTypeCheckers (SubscriptionContext ctx ) {
301301 pureFunctionsCheckers = PURE_FUNCTIONS .stream ().collect (Collectors .toMap (f -> f , f -> ctx .typeChecker ().typeCheckBuilder ().isTypeWithName (f )));
302302 pureGetitemTypesCheckers = PURE_GETITEM_TYPES .stream ().map (f -> ctx .typeChecker ().typeCheckBuilder ().isTypeOrInstanceWithName (f )).collect (Collectors .toSet ());
303303 pureContainsTypesCheckers = PURE_CONTAINS_TYPES .stream ().map (f -> ctx .typeChecker ().typeCheckBuilder ().isTypeOrInstanceWithName (f )).collect (Collectors .toSet ());
304304 }
305305
306- private static void checkExpression (SubscriptionContext ctx , Expression expression ) {
306+ private void checkExpression (SubscriptionContext ctx , Expression expression ) {
307307 if (expression .is (Tree .Kind .CALL_EXPR )) {
308308 CallExpression callExpression = (CallExpression ) expression ;
309309 PythonType pythonType = callExpression .callee ().typeV2 ();
0 commit comments