KOSASIH / cosmic-pi-network

Field duplicates the name of its containing class PTC-W0052
Anti-pattern
Minor
3 months ago3 months old
Class member image has same name as its encolising class Image
 4class Image:
 5    def __init__(self, path: str):
 6        self.path = path
 7        self.image = cv2.imread(path) 8
 9    def resize(self, width: int, height: int) -> None:
10        self.image = cv2.resize(self.image, (width, height))