Bezleputh
faa3891f86
remove wconio dependency
2014-11-22 16:32:11 +01:00
Laurent Bachelier
21e8f82fd7
pep8: Use "X not in Y" instead of "not X in Y"
...
flake8 --select E713, semi-manual fixing
2014-10-11 01:27:24 +02:00
Laurent Bachelier
448c06d125
pep8 blank lines fixes
...
flake8 --select W391,E302,E301,E304
autopep8 can't fix W391 even though it claims it can.
Fixed using a simple custom script.
2014-10-10 23:41:44 +02:00
Romain Bignon
5bd70c564f
os.isatty is now forbidden (as stream.fileno() is not implemented by StringIO)
...
Use stream.isatty() instead.
2014-10-07 09:39:12 +02:00
Romain Bignon
51958135cb
rename CapBaseObject to BaseObject (refs #1424 )
2014-07-05 17:26:05 +02:00
Bezleputh
ce60db2e57
[iformatter] move format_dict methods' content from PrettyFormatter to IFormatter
2014-06-27 09:00:07 +02:00
Bezleputh
aeab3fac71
[json] handle format_collection
2014-06-23 09:29:32 +02:00
Bezleputh
7b5ab26d0f
[repl] move format_collection from repl to ifromatter
2014-06-23 09:28:26 +02:00
Oleg Plakhotniuk
8875fad439
Table and Json formatters can write output to a file now.
...
Signed-off-by: Oleg Plakhotniuk <olegus8@gmail.com>
closes #1412
2014-06-22 19:08:28 +02:00
Florent
020124d5ff
Remove the '*' special fields in formatter
2014-06-18 15:19:35 +02:00
Florent
30732318b5
Introduce the DISPLAYED_FIELDS in formatter
2014-06-17 15:45:13 +02:00
Romain Bignon
19ae5d6312
add linesep to output content if file is not sys.stdout ( closes #1383 )
2014-05-17 15:55:03 +02:00
Romain Bignon
6fcac89dd5
first step in python3 support
2014-05-17 14:27:55 +02:00
Laurent Bachelier
132d131f87
Add a json formatter that works on a line level
2014-05-07 00:02:08 +02:00
Romain Bignon
818b756e27
json formatter: all subobjects are also encoded
2013-12-22 22:12:03 +01:00
Vincent Texier
148f6f3a2b
Fixed thumbnail field returning always "id" with json formatter
...
Version development 0.h
2013-12-22 22:02:17 +01:00
Romain Bignon
0513e86628
simplification of json formatter (refs #1294 )
2013-12-16 15:10:07 +01:00
Florent
ecddbd6be3
Fix JSON export
...
Closes #1294
2013-12-15 17:05:01 +01:00
Laurent Bachelier
e78714b560
Reuse termcolor's environment variable to disable colors
2013-08-03 01:19:05 +02:00
Romain Bignon
63648a8353
fix formatting if termcolor is not installed
...
This code was useless anyway
2013-07-30 18:51:49 +02:00
Romain Bignon
599775b3fb
when termcolor is missing, fake colored() function can add bold
2013-07-27 18:10:14 +02:00
Romain Bignon
bbbca2214b
output gay colored results of searches
2013-07-27 17:33:29 +02:00
Laurent Bachelier
a6ad7e83ff
Use newer form of catching exceptions
...
autopep8 -i --select=W602
Also some other minor deprecated syntax changes, like "while 1".
I did not commit the less obvious changes.
2013-07-27 15:16:16 +02:00
Romain Bignon
c0740e695d
remove useless import of with_statement (we do not support anymore python2.5)
...
refs #806
2013-07-27 14:38:18 +02:00
Florent
a37fcf448b
Fix printing of DictObj
...
a6fbcbaec7 introduces a bug in
printing of DictObj. It brokes "weboob-config list",
"weboob-config modules", etc.
2013-07-25 16:56:02 +02:00
Laurent Bachelier
be3e19a203
try/except import are now handled by flake8 2.0+ / pyflakes 0.6+
2013-03-19 19:10:20 +01:00
Laurent Bachelier
7094931c92
Easy spacing fixes, trailing stuff
...
Remove useless trailing \
Remove trailing spaces
Add missing empty lines
autopep8 -ir -j2 --select=E301,E302,E502,W291,W293,W391 .
Diff quickly checked.
2013-03-16 00:54:55 +01:00
Laurent Bachelier
a6fbcbaec7
Reconcile the two previous commits (json/to_dict)
...
Also fix some to_dict move things that were incomplete.
And some PEP8 fixes.
closes #1060
closes #1061
2013-03-09 15:14:17 +01:00
Julien Hebert
1b47455225
refs #1060 : move to_dict to base.py
2013-03-09 14:57:09 +01:00
Julien Hebert
8d8fe9090f
json encoder
2013-03-09 14:57:08 +01:00
Laurent Bachelier
541d080c9d
Use flake8 if available instead of pyflakes
...
With flake8, we can check for more issues and ignore those who are not
real issues.
This allowed me to find genuine errors in:
- modules/boursorama/pages/account_history.py
- modules/ing/pages/login.py
- weboob/tools/application/qt/qt.py
I left one in weboob/tools/browser/browser.py for the time being.
Some PEP8 fixes on other files.
2012-11-24 19:46:34 +01:00
Florent
bad531679a
Fix table formatter with 0.6 version
...
I didn't see a way to only align header...
2012-05-21 17:47:34 +02:00
Romain Bignon
f7214e5e62
ability to format dicts
2012-05-04 16:27:49 +02:00
Romain Bignon
101eabf17a
fix format of dicts
2012-04-07 23:15:06 +02:00
Romain Bignon
fc849995f4
rewrite of the formatters system
2012-04-03 22:40:38 +02:00
Laurent Bachelier
3b2bafdf12
Centralize "empty" comparisons
...
And always use "is" instead of "==".
2012-03-27 12:14:37 +02:00
Laurent Bachelier
006e97a8be
PEP8 style fixes and other small style fixes
...
I used autopep8 on some files and did carefully check the changes.
I ignored E501,E302,E231,E225,E222,E221,E241,E203 in my search, and at
least E501 on any autopep8 run.
Other style fixes not related to PEP8:
* Only use new-style classes. I don't think the usage of old-style
classes was voluntary. Old-style classes are removed in Python 3.
* Convert an if/else to a one-liner in mediawiki, change docstring style
change to a comment something that wasn't really appropriate for a
docstring.
* Unneeded first if condition in meteofrance
2012-03-14 04:51:46 +01:00
Romain Bignon
18dd9e2b8f
always flush formatter after calling a command
2011-08-12 09:56:30 +02:00
Romain Bignon
9afb301ebe
move select() in parser
2011-04-09 11:25:13 +02:00
Romain Bignon
7e2bb91b3b
change license to AGPLv3+
2011-04-08 12:48:07 +02:00
Laurent Dufréchou
86937aef95
Modifications to support boobank under win32
...
Signed-off-by: Romain Bignon <romain@peerfuse.org>
2011-03-17 11:55:46 +01:00
Romain Bignon
99785b5a4d
open stty in a shell
2011-03-14 17:34:48 +01:00
Bluebird75
3f40fb2de7
- use an OS independant way of identifying base module directory - use a more portable way of reading stty output
2011-03-14 17:19:53 +01:00
Romain Bignon
bafbf3644a
use IFormatter.(BOLD|NC) on every formatters
2011-03-09 09:26:55 +01:00
juke
480e53cb00
no bold when -O
2011-03-09 09:26:02 +01:00
Romain Bignon
7bf2c007ff
fix missing import of with_statement
2011-02-28 10:51:05 +01:00
Juke
1382b50a7d
cleaner solution to output to a file
2011-02-25 18:49:23 +01:00
Christophe Benz
bc606d3640
add space to join for user message
2011-01-05 17:09:08 +01:00
Romain Bignon
1edaf7fd9f
fix return value of iter_city_search ( closes #457 )
2011-01-02 22:47:11 +01:00
Christophe Benz
3dd50f363d
remove unnecessary brackets
2010-12-08 18:10:42 +01:00