I have a class defined in Python 2.7 like this:
from future.builtins import object
class Point(object):
def __init__(self, x, y):
self.x = x
self.y = y
In PyCharm, this gives a warning in the __init__
line:
Signature is not compatible to __new__.
I don't understand what this warning is telling me. Can someone give an example where this warning would rightfully catch an error or can this warning be turned off?
There's a PyCharm thread for this, but it doesn't help me: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000254530-PyCharm-init-Signature-is-not-compatible-to-new-
I suffered from the same problem and found the solution in here.
As discussed in the above link, a direct solution is to remove your Pycharm config directory ("/home/username/.PyCharm2018.3" for me). However, it would remove all your other configs too. Finally, I just fix the problem by removing the rule from inspections. You can find the rule in the Pycharm Setting window (see the figure as follow).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With