Properly type SCMTool.scmtool_id as a string.

Review Request #13200 — Created Aug. 10, 2023 and submitted

Information

Review Board
release-6.x

Reviewers

We define SCMTool.scmtool_id as a helper property that computes an ID
if not already set, based on an Entrypoint. This is here because we used
to use entrypoint names as the IDs, and while transitioning away from
that, we needed to maintain compatibility.

We still need this compatibility shim (whether here or in registration,
but at the moment it's here). Power Pack still fails to set an SCMTool
ID for TFS and TFS-Git, so this is still relevant.

Because we assign this to a property, type checkers think the proper
type is that of the helper. This change explicitly marks it as a str.

Unit tests pass.

Summary ID
Properly type SCMTool.scmtool_id as a string.
We define `SCMTool.scmtool_id` as a helper property that computes an ID if not already set, based on an Entrypoint. This is here because we used to use entrypoint names as the IDs, and while transitioning away from that, we needed to maintain compatibility. We still need this compatibility shim (whether here or in registration, but at the moment it's here). Power Pack still fails to set an SCMTool ID for TFS and TFS-Git, so this is still relevant. Because we assign this to a property, type checkers think the proper type is that of the helper. This change explicitly marks it as a `str`.
61c9991d72189a564a76160de5ff4e36bcd415e4
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (16562c0)