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

Code before:
class Axes(VGroup, CoordinateSystem):
    """Creates a set of axes.

    Parameters
    ----------
    x_range
        The :code:`[x_min, x_max, x_step]` values of the x-axis.
    y_range
        The :code:`[y_min, y_max, y_step]` values of the y-axis.
    x_length
        The length of the x-axis.
    y_length
        The length of the y-axis.
    axis_config
        Arguments to be passed to :class:`~.NumberLine` that influences both axes.
    x_axis_config
        Arguments to be passed to :class:`~.NumberLine` that influence the x-axis.
    y_axis_config
        Arguments to be passed to :class:`~.NumberLine` that influence the y-axis.
    kwargs : Any
        Additional arguments to be passed to :class:`CoordinateSystem` and :class:`~.VGroup`.
    """

    def __init__(
        self,
        x_range: Optional[Union[Sequence[int], np.ndarray]] = None,
        y_range: Optional[Union[Sequence[int], np.ndarray]] = None,
        x_length: Optional[float] = round(config.frame_width) - 2,
        y_length: Optional[float] = round(config.frame_height) - 2,
        axis_config: Optional[dict] = None,
        x_axis_config: Optional[dict] = None,
        y_axis_config: Optional[dict] = None,
        **kwargs,
    ):
        VGroup.__init__(self, **kwargs)
        CoordinateSystem.__init__(self, x_range, y_range, x_length, y_length)

        self.axis_config = {"include_tip": True, "numbers_to_exclude": [0]}
        self.x_axis_config = {}
        self.y_axis_config = {"rotation": 90 * DEGREES, "label_direction": LEFT}

        self.update_default_configs(
            (self.axis_config, self.x_axis_config, self.y_axis_config),
            (axis_config, x_axis_config, y_axis_config),
        )
        self.x_axis = self.create_axis(self.x_range, self.x_axis_config, self.x_length)
        self.y_axis = self.create_axis(self.y_range, self.y_axis_config, self.y_length)

        # Add as a separate group in case various other
        # mobjects are added to self, as for example in
        # NumberPlane below

Review comment (bug):
If I'm not wrong, `Sequence` type hints are meant for coordinates and `x_range` doesn't contain coordinates.
Also, the range terms can be `float`s
```suggestion
        x_range: Optional[Union[List[float], np.ndarray]] = None,
```

Code after:
        """Gets the label for an axis.

        Parameters
        ----------
        label
            The label. Can be any mobject or `int/float/str` to be used with :class:`~.MathTex`
        axis
            The axis to which the label will be added.
        edge
            The edge of the axes to which the label will be added. ``RIGHT`` adds to the right side of the axis
        direction
            Allows for further positioning of the label.
        buff
            The distance of the label from the line.

        Returns
        -------
        :class:`~.Mobject`
            The positioned label along the given axis.
        """

        label = self.create_label_tex(label)
        label.next_to(axis.get_edge_center(edge), direction, buff=buff)
        label.shift_onto_screen(buff=MED_SMALL_BUFF)
        return label

    def get_axis_labels(
        self,
        x_label: Union[float, str, "Mobject"] = "x",
        y_label: Union[float, str, "Mobject"] = "y",
    ) -> "VGroup":
        """Defines labels for the x_axis and y_axis of the graph.

        Parameters
        ----------
        x_label
            The label for the x_axis
        y_label
            The label for the y_axis

        Returns
        -------
        :class:`~.VGroup`
            A :class:`~.Vgroup` of the labels for the x_axis and y_axis.

        See Also
        --------
        :class:`get_x_axis_label`
        :class:`get_y_axis_label`
        """