Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
weboob
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ludovic LANGE
weboob
Commits
081214c1
Commit
081214c1
authored
Feb 26, 2019
by
Romain Bignon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
table formatter: convert lists to displayable ones
parent
139760e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
weboob/tools/application/formatters/table.py
weboob/tools/application/formatters/table.py
+7
-1
No files found.
weboob/tools/application/formatters/table.py
View file @
081214c1
...
...
@@ -88,7 +88,7 @@ class TableFormatter(IFormatter):
for
line
in
queue
:
for
_
in
range
(
maxrow
-
len
(
line
)):
line
+=
(
''
,)
table
.
add_row
(
line
)
table
.
add_row
(
[
self
.
format_cell
(
cell
)
for
cell
in
line
]
)
if
self
.
HTML
:
s
+=
table
.
get_html_string
()
...
...
@@ -99,6 +99,12 @@ class TableFormatter(IFormatter):
return
s
def
format_cell
(
self
,
cell
):
if
isinstance
(
cell
,
list
):
return
', '
.
join
([
'
%
s'
%
item
for
item
in
cell
])
return
cell
def
format_dict
(
self
,
item
):
if
self
.
keys
is
None
:
self
.
keys
=
list
(
item
.
keys
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment