Mikhail Beliy
Mikhail Beliy

Reputation: 153

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

Upvotes: 7

Views: 5646

Answers (1)

Mikhail Beliy
Mikhail Beliy

Reputation: 153

File -> Manage IDE Settings -> Restore Default Settings

Upvotes: 2

Related Questions