Avatar of James Hancock
James Hancock
Flag for United States of America asked on

PyCharm codechecker corrections are strange. Help understand

I have the following code in a .py file in PyCharm Python dev suite

__author__ = 'james.....'

class binaryNode() :


    def __init__(self,rootid):
      self.left = None
      self.right = None
      self.rootid = rootid

Open in new window


The code inspector thinks that rootid is incorrect in both places, and it makes no sense
It says "Typo in word 'rootid'  "

What have I done wrong?
Thanks
PythonProgramming

Avatar of undefined
Last Comment
Suhas .

8/22/2022 - Mon
Suhas .

since rootid is new word and its not recongnized, you need to add it to dictionary of PyCharm.
Once you add it and do inspect code, it will say 'No Suspecious code found'.
gelonida

@suhas

so you have to add every new variable name to a PyCharm dictionary?

I personally don't use PyCharm, but if I recall correctly, one of my friends was using PyCharm and did not have this problem.

Is this perhaps a PyCharm setting, that can be disabled?
Not everybody who's using PyCharm might want to declare every new variable name / property name to PyCharm.
ASKER CERTIFIED SOLUTION
Suhas .

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61