관리-도구
편집 파일: spinner.cpython-38.pyc
U ʗRe � @ s d dl mZmZmZmZmZ ddlmZ ddlm Z ddl mZ ddlm Z ertddlmZmZmZmZ ddlmZ G d d � d �Zedk�rd dlmZ dd lmZ ddlmZ ddlmZ edd� ee� � �D �ddd�Z!eee!ddd�dd��Zed� q�W 5 Q R X dS )� )�cast�List�Optional� TYPE_CHECKING�Union� )�SPINNERS)�Measurement)�Table)�Text)�Console�ConsoleOptions�RenderResult�RenderableType)� StyleTypec @ s� e Zd Zdddd�eded edd�dd �Zd ddd �dd�Zd ded �dd�Z edd�dd�Z dddd�ded ee dd�dd�ZdS )�Spinner� Ng �?)�style�speedr r )�name�textr r �returnc C s� zt | }W n" tk r. td|����Y nX t|t�rDt�|�n|| _ttt |d �dd� | _ tt |d �| _d| _|| _ || _d| _d| _dS )a A spinner animation. Args: name (str): Name of spinner (run python -m rich.spinner). text (RenderableType, optional): A renderable to display at the right of the spinner (str or Text typically). Defaults to "". style (StyleType, optional): Style for spinner animation. Defaults to None. speed (float, optional): Speed factor for animation. Defaults to 1.0. Raises: KeyError: If name isn't one of the supported spinner animations. zno spinner called �framesN�interval� )r �KeyError� isinstance�strr �from_markupr r r r �floatr � start_timer r �frame_no_offset� _update_speed)�selfr r r r �spinner� r% ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/rich/spinner.py�__init__ s �zSpinner.__init__r r r )�console�optionsr c c s | � |�� �V d S )N)�render�get_time)r# r( r) r% r% r&