import random
class Logic:
def __init__(self):
super().__init__()
self.actual = [[0 for _ in range(8)] for _ in range(10)]
self.danger()
def danger(self):
p = random.randint(0, 9)
q = random.randint(0, 7)
self.actual[p][q] = '#'
parameter q in the last line shows this error :
Unexpected type(s): (int, str) Possible type(s): (_SupportsIndex, int) (slice, Iterable[int])
Inspection info: This inspection detects type errors in function call expressions. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Types of function parameters can be specified in docstrings or in Python 3 function annotations.
Aucun commentaire:
Enregistrer un commentaire