Skip to content
Snippets Groups Projects
  1. Jan 06, 2023
    • Kartik Ohri's avatar
      Fix mypy issues · a2b39603
      Kartik Ohri authored
      a2b39603
    • Kartik Ohri's avatar
      Type annotations in metadata mappings · d1924d32
      Kartik Ohri authored
      Summary: Add type annotations to files in swh/indexer/metadata_dictionary/ (T2259)
      
      This patch adds type annotations to metadata mappings so that the mypy
      type checker can detect bugs in code. While working on the path, I also
      encountered these issues:
      
      1) TypedDict does not support using variables in defining or assigning
      keys. At a lot of places, the code uses SCHEMA_URI to construct the
      keys. mypy raises errors at these places. There is a tradeoff between
      replacing SCHEMA_URI with its literal value everywhere and using
      type: ignore hints.
      
      2) mypy raises error on detecting for implicit None returns, so I had
      to add return None at many places.
      
      3) At a few places, @property s' are accessed using `cls`. mypy
      rightfully raises an error, so I had to add ignore to silence it for
      now. It appears Python 3.9+ supports class level properties so the
      ignores could be replaced by the proper handling when the minimum
      python version is raised.
      
      Closes T2259.
      
      Reviewers: vlorentz
      d1924d32
  2. Feb 24, 2022
  3. Feb 10, 2022
  4. Feb 07, 2022
  5. Jan 21, 2022
  6. Jan 11, 2022
  7. Dec 21, 2021
  8. Dec 16, 2021
  9. Jun 09, 2021
  10. May 28, 2021
  11. May 06, 2021
  12. Apr 26, 2021
    • Antoine Lambert's avatar
      tox: Add sphinx environments to check sane doc build · ebbd5f78
      Antoine Lambert authored
      Enable to check package documentation can be built without producing
      sphinx warnings.
      
      The sphinx environment is designed to be used in continuous integration
      in order to prevent breaking documentation build when committing changes.
      
      The sphinx-dev environment is designed to be used inside a full swh
      development environment.
      
      Related to T3258
      ebbd5f78
  13. Apr 02, 2021
  14. Mar 19, 2021
  15. Mar 06, 2021
  16. Mar 01, 2021
  17. Feb 01, 2021
  18. Jan 04, 2021
  19. Dec 04, 2020
  20. Dec 02, 2020
  21. Nov 27, 2020
  22. Nov 26, 2020
  23. Nov 16, 2020
  24. Nov 10, 2020
  25. Nov 05, 2020
Loading