Rename method to avoid similar names
This commit is contained in:
parent
d5bbe5139d
commit
c1bfe294ce
4
cli.py
4
cli.py
@ -42,13 +42,13 @@ class Cli:
|
|||||||
|
|
||||||
def calculate_ratings(self):
|
def calculate_ratings(self):
|
||||||
with Pool(processes=cpu_count()) as pool:
|
with Pool(processes=cpu_count()) as pool:
|
||||||
ratings = [(image, pool.apply_async(self.calculate_rating,
|
ratings = [(image, pool.apply_async(self.rate_image,
|
||||||
(image, self.args.method)))
|
(image, self.args.method)))
|
||||||
for image in self.args.images]
|
for image in self.args.images]
|
||||||
self.image_ratings = {image: promise.get() for image, promise in ratings}
|
self.image_ratings = {image: promise.get() for image, promise in ratings}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def calculate_rating(image, method):
|
def rate_image(image, method):
|
||||||
return getattr(imgrate(image), method)
|
return getattr(imgrate(image), method)
|
||||||
|
|
||||||
def print_ratings(self):
|
def print_ratings(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user