From 8059457a1be9bf491735eae0158b4f7ca3163b27 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Thu, 2 Mar 2017 21:58:25 +0300 Subject: [PATCH] There is no type.__prepare__ so we cannot detect a false negative We used to pretend that this method existed and that it was an override when in fact it is not. We could check __prepare__ based on this special knowledge. --- .../inspections/PyMethodOverridingInspection/DunderPrepare.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/testData/inspections/PyMethodOverridingInspection/DunderPrepare.py b/python/testData/inspections/PyMethodOverridingInspection/DunderPrepare.py index e9002f958bc4..cd1062b86dfb 100644 --- a/python/testData/inspections/PyMethodOverridingInspection/DunderPrepare.py +++ b/python/testData/inspections/PyMethodOverridingInspection/DunderPrepare.py @@ -1,6 +1,6 @@ class MyType1(type): @staticmethod - def __prepare__(metacls, name): + def __prepare__(metacls, name): return {}