Codacy correction
This commit is contained in:
committed by
Nicola Demo
parent
ea3d1924e7
commit
dd43c8304c
@@ -37,14 +37,11 @@ class Batch:
|
||||
if item in super().__getattribute__('attributes'):
|
||||
dataset = super().__getattribute__(item)
|
||||
index = super().__getattribute__(item + '_idx')
|
||||
return PinaSubset(
|
||||
dataset.dataset,
|
||||
dataset.indices[index])
|
||||
else:
|
||||
return super().__getattribute__(item)
|
||||
return PinaSubset(dataset.dataset, dataset.indices[index])
|
||||
return super().__getattribute__(item)
|
||||
|
||||
def __getattr__(self, item):
|
||||
if item == 'data' and len(self.attributes) == 1:
|
||||
item = self.attributes[0]
|
||||
return super().__getattribute__(item)
|
||||
raise AttributeError(f"'Batch' object has no attribute '{item}'")
|
||||
raise AttributeError(f"'Batch' object has no attribute '{item}'")
|
||||
|
||||
Reference in New Issue
Block a user