self.type is a class variable up there ^^

Line 3089 for an example