- Nov 09, 2019
-
-
- Mar 28, 2019
-
-
It happens for example in weboob.capabilities.account.Account which gives None as default value.
-
- Feb 24, 2019
-
-
Romain Bignon authored
-
- Jan 05, 2019
-
-
- Nov 10, 2018
-
-
We need to give error parameter to find_object 26504@sibi
-
-
- Sep 16, 2018
-
-
Or at least make code look slightly better
-
hydrargyrum authored
Python's enums are not extensible, values can't be added and they can't be subclassed. This is problematic if weboob devel adds new values, because stable weboob will not be able to use them. They would need to be replaced by a default value or None, which loses information. Instead, implement custom enums that contain plain constants and support adding values aftewards.
-
- Jul 29, 2018
-
-
- Jun 19, 2018
-
-
hydrargyrum authored
Python 2's json module stringifies values using the builtin str() function, so any custom __str__ function will be used instead of the number representation: json.dumps([AccountType.CHECKING]) will then return invalid JSON "[CHECKING]" instead of "[1]". By enforcing use of int.__str__, the previous behavior is restored. See https://bugs.python.org/issue18264 (it's fixed in Python 3).
-
- Jun 16, 2018
-
-
hydrargyrum authored
Python 3.4 added new Enum types that enforce a value belonging to the enumeration. This commit retires our homemade enum and use Python's Enum type. Python 2 compatibility is achieved with "enum34" package. Housing and Calendar capabilities are updated to use those new enums.
-
- Jun 09, 2018
-
-
Since the currencies dictionary is ordered, it is preferable to first iter over this dictionary and then iter over the curtexts in order to prevent mismatches. For example, the get_currency method selected the 'PEN' currency in several cases: if the text contains 'en EUR', the curtexts list will be ['en', 'EUR'] and if we iterate over curtexts first, 'en' will be matched with 'PEN' because of the "if curtext in currency" line without ever trying to match 'EUR' with 'EUR'. Therefore, curtexts are now strictly matched with currencies since most websites use the ISO-4217 norm anyways and because it is better to return None than to match wrong currencies such as peruvian sols. Example: if the text contains 'CHAUDE', it will match it with 'AUD' (australian dollars) with is wrong, whereas "if curtext == currency" is stricter but avoids false matches. Closes: 5548@zendesk
-
- May 28, 2018
-
-
- May 05, 2018
-
-
don't crash handling non-mandatory fields instead we fill them with the new FetchError EmptyField
-
- Mar 03, 2018
-
-
'F' and 'fr.' regex for LUF(currency) is not enough accurate. For exemple: hsbc life insurance id contains 'F' and 'EUR'. Closes: 4387@zendesk
-
- Feb 04, 2018
-
-
It seems common that websites shows the currency between parenthesis, it allows the filter to parse them correctly.
-
- Jan 14, 2018
-
-
hydrargyrum authored
-
- Dec 30, 2017
-
-
- Oct 08, 2017
-
-
- Jul 09, 2017
-
-
hydrargyrum authored
-
- Jun 19, 2017
-
-
hydrargyrum authored
Since those classes store some class-level declared fields (Field and URL) in a dictionary and are not present as attributes, those fields are not present in dir() even though __getattr__ will find them. By reimplementing __dir__, they can be discovered as ordinary attributes.
-
hydrargyrum authored
By default, PyYAML dumps all fields, giving poor results for BaseObject and its fields: !!python/unicode paris: !!python/object:weboob.capabilities.calendar.Query _fields: !!python/object/apply:collections.OrderedDict - - - url - !!python/object:weboob.capabilities.base.StringField _creation_counter: 0 doc: url types: !!python/tuple - &id003 !!python/name:__builtin__.unicode value: !!python/object:weboob.capabilities.base.NotLoadedType {} etc. When pickle methods are provided, PyYAML uses them. In this case, a BaseObject will be dumped as a plain old dict.
-
hydrargyrum authored
In Python2 anyway, bytes is an alias for str.
-
hydrargyrum authored
__str__ is reimplemented in terms of __unicode__ and __repr__ else.
-
hydrargyrum authored
The syntax for using a metaclass is different in python2 and python3, and there are existing helpers. Add six as a dependency in setup.py.
-
hydrargyrum authored
TODO this is less efficient on python2
-
hydrargyrum authored
Some functions changed return type from python2 to python3 TODO: not everything is tested, a full review is needed + run is needed
-
hydrargyrum authored
With: futurize -w -1 weboob
-
hydrargyrum authored
To make compatible code for py2/py3 using methods like __str__, it's better to avoid unicode_literals, since __str__/__repr__ must always return the native str type of the python version.
-
- May 20, 2017
-
-
hydrargyrum authored
When calling copy() method which does a shallow copy, the _fields dict was copied, but not its values (which are Field instances). Since the real content of the BaseObject is stored in the Field instances, the values were shared instead of being shallow-copied: obj2 = obj1.copy() obj2.foo = 'bar' # would modify obj1.foo Since _fields is kind of read-only, it's useless not to copy the Field instances.
-
- Jan 28, 2017
-
-
-
fix "weboob.capabilities.base: use OrderedDict for currencies"
-
-
- Jan 25, 2017
-
-
Since Python 2.7 is the minimum version supported, collections.OrderedDict is guaranteed to exist and there is no need to reimplement it.
-
- Dec 03, 2016
-
-
if True, prevents budgea backend to delete the transactions
-
- Nov 18, 2016
-
-
- Sep 07, 2016
-
-
Bezleputh authored
[core] clean my crap a tuple containing a single value have to include a comma, even though there is only one value −
-
- Aug 07, 2016
-
-
- Jul 02, 2016
-
-