Changed all files to (mostly) conform to PEP8

This commit is contained in:
Grant Sanderson
2018-04-06 13:58:59 -07:00
parent 7c272c6236
commit d4392de600
71 changed files with 3736 additions and 3604 deletions

View File

@ -4,32 +4,38 @@ from constants import *
from mobject.geometry import Rectangle
from utils.config_ops import digest_config
class ScreenRectangle(Rectangle):
CONFIG = {
"width_to_height_ratio" : 16.0/9.0,
"height" : 4,
"width_to_height_ratio": 16.0 / 9.0,
"height": 4,
}
def generate_points(self):
self.width = self.width_to_height_ratio * self.height
Rectangle.generate_points(self)
class FullScreenRectangle(ScreenRectangle):
CONFIG = {
"height" : FRAME_HEIGHT,
"height": FRAME_HEIGHT,
}
class FullScreenFadeRectangle(FullScreenRectangle):
CONFIG = {
"stroke_width" : 0,
"fill_color" : BLACK,
"fill_opacity" : 0.7,
"stroke_width": 0,
"fill_color": BLACK,
"fill_opacity": 0.7,
}
class PictureInPictureFrame(Rectangle):
CONFIG = {
"height" : 3,
"aspect_ratio" : (16, 9)
"height": 3,
"aspect_ratio": (16, 9)
}
def __init__(self, **kwargs):
digest_config(self, kwargs)
height = self.height
@ -37,8 +43,8 @@ class PictureInPictureFrame(Rectangle):
kwargs.pop("height")
Rectangle.__init__(
self,
width = self.aspect_ratio[0],
height = self.aspect_ratio[1],
width=self.aspect_ratio[0],
height=self.aspect_ratio[1],
**kwargs
)
self.scale_to_fit_height(height)