ok
Direktori : /opt/alt/python38/lib64/python3.8/__pycache__/ |
Current File : //opt/alt/python38/lib64/python3.8/__pycache__/formatter.cpython-38.pyc |
U .��c'; � @ s� d Z ddlZddlZejdedd� dZG dd� d�ZG dd � d �ZG d d� d�ZG dd � d e�Z G dd� de�Z ddd�Zedkr�e� dS )a Generic output formatting. Formatter objects transform an abstract flow of formatting events into specific output events on writer objects. Formatters manage several stack structures to allow various properties of a writer object to be changed and restored; writers need not be able to handle relative changes nor any sort of ``change back'' operation. Specific writer properties which may be controlled via formatter objects are horizontal alignment, font, and left margin indentations. A mechanism is provided which supports providing arbitrary, non-exclusive style settings to a writer as well. Additional interfaces facilitate formatting events which are not reversible, such as paragraph separation. Writer objects encapsulate device interfaces. Abstract devices, such as file formats, are supported as well as physical devices. The provided implementations all work with abstract devices. The interface makes available mechanisms for setting the properties which formatter objects manage and inserting data into the output. � Nz"the formatter module is deprecated� )� stacklevelc @ s� e Zd ZdZd(dd�Zdd� Zdd� Zd d � Zd)dd�Zd d� Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd*d$d%�Zd+d&d'�ZdS ),� NullFormattera= A formatter which does nothing. If the writer parameter is omitted, a NullWriter instance is created. No methods of the writer are called by NullFormatter instances. Implementations should inherit from this class if implementing a writer interface but don't need to inherit any implementation. Nc C s |d krt � }|| _d S �N)� NullWriter�writer��selfr � r �./opt/alt/python38/lib64/python3.8/formatter.py�__init__) s zNullFormatter.__init__c C s d S r r �r � blankliner r r � end_paragraph- � zNullFormatter.end_paragraphc C s d S r r �r r r r �add_line_break. r zNullFormatter.add_line_breakc O s d S r r �r �args�kwr r r �add_hor_rule/ r zNullFormatter.add_hor_rulec C s d S r r �r �format�counterr r r r �add_label_data0 r zNullFormatter.add_label_datac C s d S r r �r �datar r r �add_flowing_data1 r zNullFormatter.add_flowing_datac C s d S r r r r r r �add_literal_data2 r zNullFormatter.add_literal_datac C s d S r r r r r r �flush_softspace3 r zNullFormatter.flush_softspacec C s d S r r �r �alignr r r �push_alignment4 r zNullFormatter.push_alignmentc C s d S r r r r r r � pop_alignment5 r zNullFormatter.pop_alignmentc C s d S r r )r �xr r r � push_font6 r zNullFormatter.push_fontc C s d S r r r r r r �pop_font7 r zNullFormatter.pop_fontc C s d S r r )r �marginr r r �push_margin8 r zNullFormatter.push_marginc C s d S r r r r r r � pop_margin9 r zNullFormatter.pop_marginc C s d S r r �r �spacingr r r �set_spacing: r zNullFormatter.set_spacingc G s d S r r �r �stylesr r r � push_style; r zNullFormatter.push_style� c C s d S r r �r �nr r r � pop_style<