datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

[Invoke] Replace `List`, `Dict`, `Tuple` with the Python >= 3.9 equivalents

Open amenasria opened this issue 2 years ago • 3 comments

What does this PR do?

This PR replaces:

  • List -> list
  • Dict -> dict
  • Tuple -> tuple

Motivation

Clearer code. We're using Python >= 3.9, meaning we don't need typing for those: https://mypy.readthedocs.io/en/stable/builtin_types.html#generic-types

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

  • [ ] If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • [ ] Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • [ ] A release note has been added or the changelog/no-changelog label has been applied.
  • [ ] Changed code has automated tests for its functionality.
  • [ ] Adequate QA/testing plan information is provided. Except if the qa/skip-qa label, with required either qa/done or qa/no-code-change labels, are applied.
  • [ ] At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • [ ] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • [ ] If applicable, the need-change/operator and need-change/helm labels have been applied.
  • [ ] If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
  • [ ] If applicable, the config template has been updated.

amenasria avatar Jan 09 '24 16:01 amenasria

I remember trying this earlier, and seeing this fail because some parts of the CI use Python < 3.9, but maybe that has changed?

KSerrania avatar Jan 09 '24 16:01 KSerrania

image Cries in cringe, some of the tests are using Python 3.7 💀

amenasria avatar Jan 09 '24 16:01 amenasria

We'll see 😳

amenasria avatar Jan 09 '24 16:01 amenasria