I get a warning for one of my functions, saying the type int doesn't have the expected attribute __getitem__. I know that this comes from this part:
type(rule) == list
However, I don't know why PyCharm would assume that __getitem__ is required in this case for a value of type int. It would never reach this part of the code for an int. So my question is: Is this a bug? Can I somehow prevent this warning in this case?