Skip to content

Commit 72da802

Browse files
committed
Auto-formatting
1 parent 40c29b5 commit 72da802

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

custom_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from collections import namedtuple
22

3-
class image(namedtuple("image", ["fname", "image"])):
4-
pass
3+
4+
Image = namedtuple("Image", ["fname", "image"])

model.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def __getitem__(self, index):
3232
fname = self.fnames[index]
3333
img = io.imread(fname)
3434
# TODO revert this at some point
35-
img = img[::5,::5]
36-
return custom_types.image(fname = fname, image = img)
35+
img = img[::5, ::5]
36+
return custom_types.Image(fname=fname, image=img)
3737

3838
def __len__(self):
3939
return len(self.fnames)
@@ -55,17 +55,17 @@ def add_user(self, name):
5555

5656
def add_annotation(self, name, username, xy):
5757
self.annotations.append(dict(
58-
name = self.active_image.fname,
59-
label = name,
60-
x = xy[0],
61-
y = xy[1],
62-
username = username,
63-
timestamp = time.time())
58+
name=self.active_image.fname,
59+
label=name,
60+
x=xy[0],
61+
y=xy[1],
62+
username=username,
63+
timestamp=time.time())
6464
)
6565

6666
def fetch_image(self, index):
6767
self.active_image = self.dataset[index]
68-
return self.active_image
68+
return self.active_image
6969

7070
def to_csv(self):
7171
return pd.DataFrame(self.annotations).to_csv()

0 commit comments

Comments
 (0)