TODO.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Deferred Modernization Work
  2. ===========================
  3. The packaging migration (setup.py → pyproject.toml, drop six, refresh docs)
  4. landed in commits ``7df4a94``..``HEAD``. The items below were identified
  5. during that sweep but deliberately left out because each is large enough
  6. to warrant its own focused PR.
  7. Mechanical Python idiom updates
  8. -------------------------------
  9. Each of these is a near-mechanical refactor with a wide diff. Best done
  10. one-at-a-time so reviewers can read each change as a single transformation.
  11. * **Drop explicit ``object`` base class.** ``class Foo(object):`` →
  12. ``class Foo:``. No behavior change in Py3.
  13. * **Modernize ``super()`` calls.** ``super(ClassName, self).method(...)`` →
  14. ``super().method(...)``. The arguments are required only in Py2.
  15. * **Adopt f-strings.** ``"x={0}".format(x)`` and ``"x=%s" % x`` →
  16. ``f"x={x}"``. Skip for logging calls — those should keep ``%s``
  17. formatting so the logger can short-circuit when the level is disabled.
  18. * **Switch typing imports to builtins.** ``List[X]`` / ``Dict[K, V]`` /
  19. ``Optional[X]`` → ``list[X]`` / ``dict[K, V]`` / ``X | None`` once a
  20. Python 3.10+ floor is acceptable (we already require 3.13, so this is
  21. safe today).
  22. Lint and tooling
  23. ----------------
  24. * **Fix the ~23 pre-existing flake8 import-order errors.** Run
  25. ``tox -e lint`` to see the list. Mostly ``I100``/``I201``/``I202``
  26. under ``cloudbridge/providers/azure``, ``gcp``, and ``openstack``.
  27. * **Consider replacing flake8 + flake8-import-order with ruff.** Ruff
  28. reads ``pyproject.toml``, runs ~100× faster, and covers import
  29. ordering (``I``) plus most flake8 plugins out of the box.
  30. * **Consider adding mypy / pyright in CI.** The codebase has no type
  31. hints today; this would be a meaningful uplift, not a one-PR task.
  32. Repository hygiene
  33. ------------------
  34. * **Untracked local-dev artifacts at the repo root** — ``azure.txt``,
  35. ``openstack.txt``, ``docs2/``, ``script_test.py``, ``openstack.log``.
  36. Each likely belongs in ``.gitignore`` or in a developer's untracked
  37. workspace; investigate before either committing or deleting.