Hacked By AnonymousFox
�
�Rec @ s d d l Z d d l Z d d l Z d d l m Z d d l m Z e j d k r\ e Z n d d � Z d d � Z d � Z
d � Z d � Z d
e f d � � YZ d e f d
� � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d S( i����N( t Decimal( t InlineTableDicti c C s; | j s t d � � n t | d | �} | j | � | S( s Writes out dict as toml to a file
Args:
o: Object to dump into toml
f: File descriptor where the toml should be stored
encoder: The ``TomlEncoder`` to use for constructing the output string
Returns:
String containing the toml corresponding to dictionary
Raises:
TypeError: When anything other than file descriptor is passed
s0 You can only dump an object to a file descriptort encoder( t writet TypeErrort dumps( t ot fR t d( ( s� /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/toml/encoder.pyt dump s
c C s� d } | d k r$ t | j � } n | j | d � \ } } | | 7} t | � g } x$| r{g | D] } t | � ^ qe } x) | D]! } | | k r� t d � � q� q� W| | 7} | j � } x� | D]� } | j | | | � \ } }
| s� | rG|
rG| r| d d k r| d 7} n | d | d 7} | rG| | 7} qGn x$ |
D] } |
| | | d | <qNWq� W| } qX W| S(
s Stringifies input dict as toml
Args:
o: Object to dump into toml
encoder: The ``TomlEncoder`` to use for constructing the output string
Returns:
String containing the toml corresponding to dict
Examples:
```python
>>> import toml
>>> output = {
... 'a': "I'm a string",
... 'b': ["I'm", "a", "list"],
... 'c': 2400
... }
>>> toml.dumps(output)
'a = "I'm a string"
b = [ "I'm", "a", "list",]
c = 2400
'
```
t s Circular reference detectedi����s
s
t [s ]
t .N( t Nonet TomlEncodert __class__t
dump_sectionst idt
ValueErrort get_empty_table( R R t retvalt addtoretvalt sectionst
outer_objst sectiont section_idst outer_objt newsectionst
addtosectionst s( ( s� /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/toml/encoder.pyR "