Skip to content
Snippets Groups Projects
  1. Apr 11, 2022
  2. Apr 08, 2022
  3. Mar 31, 2022
  4. Mar 30, 2022
  5. Mar 23, 2022
  6. Mar 18, 2022
  7. Mar 16, 2022
  8. Feb 10, 2022
  9. Jan 26, 2022
  10. Jan 21, 2022
  11. Jan 17, 2022
  12. Jan 14, 2022
  13. Jan 13, 2022
  14. Jan 12, 2022
  15. Jan 07, 2022
  16. Dec 22, 2021
  17. Dec 21, 2021
  18. Dec 16, 2021
  19. Dec 15, 2021
  20. Dec 08, 2021
  21. Dec 07, 2021
  22. Dec 06, 2021
  23. Dec 01, 2021
  24. Nov 05, 2021
    • vlorentz's avatar
      Give model and swhid objects a nicer repr() · 2ffe5dba
      vlorentz authored
      1. hashes are now repr()ed as `hash_to_bytes("1234...")` instead of b"\x12\x34..."`
      2. SWHID objects are now repr()ed as `CoreSWHID.from_string('swh:1:...:1234...')`
         instead of `CoreSWHID(scheme='swh', version='1', object_type=..., object_id=b'\x12\x34')`
      3. enums are now repr()ed as `MyEnum.NAME` instead of "<MyEnum.NAME: 'value'>`
      
      Thanks to these three changes, using repr() on a model object now prints
      a string that can be pasted directly in a `.py` file to write a new
      test case.
      2ffe5dba
Loading