
    ?wg?                         d Z  G d d      Zy)zQTablib - Jira table export support.

   Generates a Jira table from the dataset.
c                   R    e Zd ZdZed        Zed        Zed        Zedd       Zy)
JIRAFormatjirac                     |j                   r| j                  |j                         nd}| j                  |      }|r| d| S |S )a  Formats the dataset according to the Jira table syntax:

        ||heading 1||heading 2||heading 3||
        |col A1|col A2|col A3|
        |col B1|col B2|col B3|

        :param dataset: dataset to serialize
        :type dataset: tablib.core.Dataset
         
)headers_get_header	_get_body)clsdatasetheaderbodys       K/var/www/horilla/myenv/lib/python3.12/site-packages/tablib/formats/_jira.py
export_setzJIRAFormat.export_set
   sD     6=__1"}}W%&,&D6"6$6    c                 h    dj                  |D cg c]  }| j                  |       c}      S c c}w )Nr   )join_serialize_row)r   r   rows      r   r
   zJIRAFormat._get_body   s*    yyWEc#,,S1EFFEs   /c                 (    | j                  |d      S )Nz||)	delimiter)r   )r   r   s     r   r	   zJIRAFormat._get_header   s    !!'T!::r   c                     dj                  ||j                  |D cg c]  }|rt        |      nd c}      |      S c c}w )Nz{}{}{} )formatr   str)r   r   r   items       r   r   zJIRAFormat._serialize_row"   s>    NN3G4CI36GH
 	
Gs   >N)|)	__name__
__module____qualname__titleclassmethodr   r
   r	   r    r   r   r   r      sW    E7 7 G G ; ; 
 
r   r   N)__doc__r   r#   r   r   <module>r%      s   !
 !
r   