style(python): format with black

This commit is contained in:
GreasrySlug 2023-03-16 22:39:34 +09:00
parent 454224858b
commit 08ad656240
17 changed files with 208 additions and 36 deletions

View file

@ -4,14 +4,18 @@ class Array(list):
return Array(list(set(self)))
else:
removes = []
for (lhs, rhs) in zip(self, self[1:]):
for lhs, rhs in zip(self, self[1:]):
if same_bucket(lhs, rhs):
removes.append(lhs)
for remove in removes:
self.remove(remove)
return self
def push(self, value):
self.append(value)
return self
def partition(self, f):
return Array(list(filter(f, self))), Array(list(filter(lambda x: not f(x), self)))
return Array(list(filter(f, self))), Array(
list(filter(lambda x: not f(x), self))
)