Repository: ManimCommunity/manim
File: manim/mobject/three_dimensions.py (Python)

Code before:
# Specific shapes


class Sphere(ParametricSurface):
    """A sphere

    Examples
    ---------
    .. manim:: ExampleSphere
        :save_last_frame:

        class ExampleSphere(ThreeDScene):
            def construct(self):
                self.set_camera_orientation(phi = PI/6, theta = PI/6)
                sphere1 = Sphere(center = (3,0,0),radius = 1,resolution = (30, 40),u_min = 0.001,u_max = PI - 0.001,v_min = 0,v_max = TAU)
                sphere1.set_color(RED)
                self.add(sphere1)
                sphere2 = Sphere(center=(0,1,0),radius=2,resolution=(40, 50))
                sphere2.move_to((-1,-3,0))
                sphere2.set_color(GREEN)
                self.add(sphere2)
                sphere3 = Sphere(center=(0,1,0),radius=2,resolution=(40, 50))
                sphere3.move_to((-1,2,0))
                sphere3.set_color(BLUE)
                self.add(sphere3)

    """

    def __init__(
        self,
        center=ORIGIN,
        radius=1,
        resolution=(12, 24),
        u_min=0.001,
        u_max=PI - 0.001,
        v_min=0,
        v_max=TAU,
        **kwargs
    ):
        ParametricSurface.__init__(
            self,
            self.func,
            resolution=resolution,
            u_min=u_min,
            u_max=u_max,
            v_min=v_min,
            v_max=v_max,
            **kwargs,
        )
        self.radius = radius
        self.scale(self.radius)

Review comment (suggestion):
Apply black formatting so that the text is easier to read and so that a user does not have to scroll horizontally to read the code
```suggestion
        class ExampleSphere(ThreeDScene):
            def construct(self):
                self.set_camera_orientation(phi=PI / 6, theta=PI / 6)
                sphere1 = Sphere(
                    center=(3, 0, 0),
                    radius=1,
                    resolution=(30, 40),
                    u_min=0.001,
                    u_max=PI - 0.001,
                    v_min=0,
                    v_max=TAU
                )
                sphere1.set_color(RED)
                self.add(sphere1)
                sphere2 = Sphere(center=(0, 1, 0), radius=2, resolution=(40, 50))
                sphere2.move_to((-1, -3, 0))
                sphere2.set_color(GREEN)
                self.add(sphere2)
                sphere3 = Sphere(center=(0, 1, 0), radius=2, resolution=(40, 50))
                sphere3.move_to((-1, 2, 0))
                sphere3.set_color(BLUE)
                self.add(sphere3)
```

Code after:
# Specific shapes


class Sphere(ParametricSurface):
    """A mobject representing a three-dimensional sphere.

    Examples
    ---------

    .. manim:: ExampleSphere
        :save_last_frame:

        class ExampleSphere(ThreeDScene):
            def construct(self):
                self.set_camera_orientation(phi=PI / 6, theta=PI / 6)
                sphere1 = Sphere(
                    center=(3, 0, 0),
                    radius=1,
                    resolution=(20, 20),
                    u_min=0.001,
                    u_max=PI - 0.001,
                    v_min=0,
                    v_max=TAU,
                )
                sphere1.set_color(RED)
                self.add(sphere1)
                sphere2 = Sphere(center=(-1, -3, 0), radius=2, resolution=(18, 18))
                sphere2.set_color(GREEN)
                self.add(sphere2)
                sphere3 = Sphere(center=(-1, 2, 0), radius=2, resolution=(16, 16))
                sphere3.set_color(BLUE)
                self.add(sphere3)
    """

    def __init__(
        self,
        center=ORIGIN,
        radius=1,
        resolution=(12, 24),
        u_min=0.001,
        u_max=PI - 0.001,
        v_min=0,
        v_max=TAU,
        **kwargs
    ):
        ParametricSurface.__init__(
            self,
            self.func,
            resolution=resolution,
            u_min=u_min,
            u_max=u_max,