import turtle
class Polygon:
def __init__(self,sides,name,size=100,color='black',line_thickness=3):
self.sides=sides
self.name=name
self.size=size
self.color=color
self.line_thickness=line_thickness
self.interior_angles=(self.sides-2)*180
self.angle=self.interior_angles/self.sides
def draw(self):
turtle.color(self.color)
turtle.pensize(self.line_thickness)
for i in range(self.sides):
turtle.forward(self.size)
turtle.right(180-self.angle)
turtle.done()
square=Polygon(4,'Square')
square.draw()
Considering the code above, operating in VSCODE, I am wondering how to get rid of all the 'pylint' errors that continue to pop up which suggest something similar to the following:
Module 'turtle' has no 'color' member (pylint no-member)
Although the code executes just fine, it is unsettling to continue having to look at the error lines and I am wondering if there is a solution to this. Thanks for you time!