pythonpycharmrange

PyCharm, range, Expected type '_SupportsIndex', got 'int' instead


How to clear these annoying yellow things?

Expected type '_SupportsIndex', got 'int' instead

They were not there when I didn't have a GitHub Desktop app OR when I didn't have PyCharm updated.

str0 = input()
str1 = input()
k = str1.count(str0)
i = 0
for i in range(k, 0, -1):
    if (str0 * i) in str1:
        break
print(i)

This is what PyCharm shows me:

This is what PyCharm shows me


Solution

  • File -> Manage IDE Settings -> Restore Default Settings