sanketsaurav / lore

Re-definition found for builtin function PYL-W0622
Anti-pattern
Minor
4 years ago5 years old
Redefining built-in 'all'
31        commit.created_at = datetime.datetime.now()
32        commit.save()
33
34        all = lore.metadata.Commit.all()35        self.assertEqual(len(all), 1)
36
37        first = lore.metadata.Commit.first()
Redefining built-in 'type'
 34class XorSingle(Xor):
 35    def __init__(
 36        self,
 37        type 38    ):
 39        super(XorSingle, self).__init__()
 40        self.type = type
Redefining built-in 'type'
 28class KerasSingle(lore.models.keras.Base):
 29    def __init__(
 30        self,
 31        type 32    ):
 33        super(KerasSingle, self).__init__(
 34            tests.mocks.pipelines.XorSingle(type=type),
Redefining built-in 'input'
336
337
338class Distance(Base):
339    def __init__(self, lat_a, lon_a, lat_b, lon_b, input='degrees'):340        self.column = [lat_a, lon_a, lat_b, lon_b]
341        self.name = ('_').join([
342            inflection.underscore(self.__class__.__name__),
Redefining built-in 'dir'
 23class Disk(Base):
 24    EXTENSION = '.pickle'
 25
 26    def __init__(self, dir): 27        self.dir = dir
 28        self.limit = None
 29        if not os.path.exists(self.dir):