Skip to content

Commit 31c2b53

Browse files
committed
Rename a variable name
1 parent 4d8f858 commit 31c2b53

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/thumbnails/frame.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def __init__(self, size):
1717
self._max_height = math.ceil(self._max_width * self._height / self._width)
1818

1919
# Final size of the frame
20-
self.__width = None
21-
self.__height = None
20+
self._final_width = None
21+
self._final_height = None
2222

2323
@property
2424
def compress(self):
@@ -38,17 +38,17 @@ def columns_count(self):
3838
@property
3939
def width(self):
4040
"""Calculates and caches the frame width."""
41-
if not self.__width:
42-
self.__width = round(self._width * self.compress)
43-
self.__width = max(self.__width, self._min_width)
44-
self.__width = min(self.__width, self._max_width)
45-
return self.__width
41+
if not self._final_width:
42+
self._final_width = round(self._width * self.compress)
43+
self._final_width = max(self._final_width, self._min_width)
44+
self._final_width = min(self._final_width, self._max_width)
45+
return self._final_width
4646

4747
@property
4848
def height(self):
4949
"""Calculates and caches the frame height."""
50-
if not self.__height:
51-
self.__height = round(self._height * self.compress)
52-
self.__height = max(self.__height, self._min_height)
53-
self.__height = min(self.__height, self._max_height)
54-
return self.__height
50+
if not self._final_height:
51+
self._final_height = round(self._height * self.compress)
52+
self._final_height = max(self._final_height, self._min_height)
53+
self._final_height = min(self._final_height, self._max_height)
54+
return self._final_height

0 commit comments

Comments
 (0)