Skip to content
  1. Mar 28, 2019
  2. Feb 24, 2019
  3. Jan 05, 2019
  4. Nov 10, 2018
  5. Sep 16, 2018
    • Laurent Bachelier's avatar
      capabilities: PEP8 fixes · 327ae3a6
      Laurent Bachelier authored and hydrargyrum's avatar hydrargyrum committed
      Or at least make code look slightly better
      327ae3a6
    • hydrargyrum's avatar
      weboob.capabilities: replace stdlib enum with custom enums · 6cbfb7e1
      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.
      6cbfb7e1
  6. Jul 29, 2018
  7. Jun 19, 2018
  8. Jun 16, 2018
  9. Jun 09, 2018
    • Quentin Defenouillere's avatar
      [capabilities.base] Inverted iteration loops for get_currency · 292c72c3
      Quentin Defenouillere authored and Romain Bignon's avatar Romain Bignon committed
      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
      292c72c3
  10. May 28, 2018
  11. May 05, 2018
  12. Mar 03, 2018
  13. Feb 04, 2018
  14. Jan 14, 2018
  15. Dec 30, 2017
  16. Oct 08, 2017
  17. Jul 09, 2017
  18. Jun 19, 2017
  19. May 20, 2017
    • hydrargyrum's avatar
      weboob.capabilities.base.BaseObject: copy() should also copy Field objects · b1d50647
      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.
      b1d50647
  20. Jan 28, 2017
  21. Jan 25, 2017
  22. Dec 03, 2016
  23. Nov 18, 2016
  24. Sep 07, 2016
  25. Aug 07, 2016
  26. Jul 02, 2016
  27. Jun 23, 2016