Fix type issues in TFS support and add typing annotations everywhere.

Review Request #12566 — Created Aug. 24, 2022 and submitted

Information

RBTools
release-4.x

Reviewers

TFS lacked any unit tests prior to RBTools 4, and had numerous
type-related issues that broke on Python 3. Users could go back to
Python 2 on earlier versions, but that won't be the case any longer.

This change fixes up all the known type issues. It also adds typing
annotations to all parts of the code, ensuring that we are using the
proper types.

Documentation in parts have been updated as well to help keep things a
bit more maintainable.

Unit tests pass in Python 3.7-3.11.

Summary ID
Fix type issues in TFS support and add typing annotations everywhere.
TFS lacked any unit tests prior to RBTools 4, and had numerous type-related issues that broke on Python 3. Users could go back to Python 2 on earlier versions, but that won't be the case any longer. This change fixes up all the known type issues. It also adds typing annotations to all parts of the code, ensuring that we are using the proper types. Documentation in parts have been updated as well to help keep things a bit more maintainable.
396acea0a341b5bca94f16b3415643df22b3a192
Description From Last Updated

Can take this out.

maubinmaubin

I don't see a parent_key in SCMClientDiffResult. Did you mean parent_diff?

maubinmaubin

Should we mention anything about how this is the format of SCMClientRevisionSpec here?

maubinmaubin

Same parent_key comment as above.

maubinmaubin

Same parent_key comment as above.

maubinmaubin

Should we mention anything about how this is the format of SCMClientRevisionSpec here?

maubinmaubin
maubin
  1. 
      
  2. rbtools/clients/tfs.py (Diff revision 1)
     
     
     
    Show all issues

    Can take this out.

  3. rbtools/clients/tfs.py (Diff revision 1)
     
     
    Show all issues

    I don't see a parent_key in SCMClientDiffResult. Did you mean parent_diff?

  4. rbtools/clients/tfs.py (Diff revision 1)
     
     
     
    Show all issues

    Should we mention anything about how this is the format of SCMClientRevisionSpec here?

    1. I do another pass in a future change that standardizes all these. We can fix those up there.

  5. rbtools/clients/tfs.py (Diff revision 1)
     
     
    Show all issues

    Same parent_key comment as above.

  6. rbtools/clients/tfs.py (Diff revision 1)
     
     
    Show all issues

    Same parent_key comment as above.

  7. rbtools/clients/tfs.py (Diff revision 1)
     
     
     
    Show all issues

    Should we mention anything about how this is the format of SCMClientRevisionSpec here?

  8. 
      
chipx86
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.x (fc57de6)
david
  1. Ship It!
  2. 
      
Loading...