|
63 | 63 | with_header_hide=None, |
64 | 64 | ) |
65 | 65 |
|
| 66 | +tabulate._table_formats["mysql"] = tabulate.TableFormat( |
| 67 | + lineabove=tabulate.Line("+", "-", "+", "+"), |
| 68 | + linebelowheader=tabulate.Line("+", "-", "+", "+"), |
| 69 | + linebetweenrows=None, |
| 70 | + linebelow=tabulate.Line("+", "-", "+", "+"), |
| 71 | + headerrow=tabulate.DataRow("|", "|", "|"), |
| 72 | + datarow=tabulate.DataRow("|", "|", "|"), |
| 73 | + padding=1, |
| 74 | + with_header_hide=None, |
| 75 | +) |
| 76 | + |
| 77 | +tabulate._table_formats["mysql_unicode"] = tabulate.TableFormat( |
| 78 | + lineabove=tabulate.Line("┌", "─", "┬", "┐"), |
| 79 | + linebelowheader=tabulate.Line("├", "─", "┼", "┤"), |
| 80 | + linebetweenrows=None, |
| 81 | + linebelow=tabulate.Line("└", "─", "┴", "┘"), |
| 82 | + headerrow=tabulate.DataRow("│", "│", "│"), |
| 83 | + datarow=tabulate.DataRow("│", "│", "│"), |
| 84 | + padding=1, |
| 85 | + with_header_hide=None, |
| 86 | +) |
| 87 | + |
66 | 88 | # "minimal" is the same as "plain", but without headers |
67 | 89 | tabulate._table_formats["minimal"] = tabulate._table_formats["plain"] |
68 | 90 |
|
69 | 91 | tabulate.multiline_formats["psql_unicode"] = "psql_unicode" |
70 | 92 | tabulate.multiline_formats["double"] = "double" |
71 | 93 | tabulate.multiline_formats["ascii"] = "ascii" |
72 | 94 | tabulate.multiline_formats["minimal"] = "minimal" |
| 95 | +tabulate.multiline_formats["mysql"] = "mysql" |
| 96 | +tabulate.multiline_formats["mysql_unicode"] = "mysql_unicode" |
73 | 97 |
|
74 | 98 | supported_markup_formats = ( |
75 | 99 | "mediawiki", |
|
95 | 119 | "rst", |
96 | 120 | "github", |
97 | 121 | "double", |
| 122 | + "mysql", |
| 123 | + "mysql_unicode", |
98 | 124 | ) |
99 | 125 |
|
100 | 126 | supported_formats = supported_markup_formats + supported_table_formats |
101 | 127 |
|
102 | 128 | default_kwargs = { |
103 | 129 | "ascii": {"numalign": "left"}, |
104 | 130 | "ascii_escaped": {"numalign": "left"}, |
| 131 | + "mysql": {"numalign": "right"}, |
| 132 | + "mysql_unicode": {"numalign": "right"}, |
105 | 133 | } |
106 | 134 | headless_formats = ("minimal",) |
107 | 135 |
|
|
0 commit comments