• 
      

    Bring type annotations for rbtools.api up to date.

    Review Request #14454 — Created June 10, 2025 and submitted

    Information

    RBTools
    master

    Reviewers

    This change primarily replaces Optional[] and Union[] with the new
    union syntax where appropriate. There's a few additional cleanups
    sprinkled in as well.

    Ran unit tests.

    Summary ID
    Bring type annotations for rbtools.api up to date.
    This change primarily replaces `Optional[]` and `Union[]` with the new union syntax where appropriate. There's a few additional cleanups sprinkled in as well. Testing Done: Ran unit tests.
    80b640e56a6fcc357f95c14939752201546cb2eb
    Description From Last Updated

    While here, let's rename this so we're not using the name of a builtin.

    chipx86chipx86

    We may want to localize these strings. If we do, we'll need the prior form. It's clearly been this way …

    chipx86chipx86

    We can probably remove the blank line now, since these don't run up against each other as much.

    chipx86chipx86

    Same here.

    chipx86chipx86

    This should probably be a Sequence[str].

    chipx86chipx86

    Should these (and similar) be Mapping?

    chipx86chipx86

    This should probably be Mapping now.

    chipx86chipx86

    Same here.

    chipx86chipx86
    chipx86
    1. 
        
    2. rbtools/api/decode.py (Diff revision 1)
       
       
      Show all issues

      While here, let's rename this so we're not using the name of a builtin.

    3. rbtools/api/errors.py (Diff revision 1)
       
       
       
       
      Show all issues

      We may want to localize these strings. If we do, we'll need the prior form. It's clearly been this way a while so it's not any kind of priority, but just noting it.

    4. rbtools/api/errors.py (Diff revision 1)
       
       
      Show all issues

      This should probably be a Sequence[str].

    5. rbtools/api/resource/base.py (Diff revision 1)
       
       
       
      Show all issues

      Should these (and similar) be Mapping?

    6. rbtools/api/resource/root.py (Diff revision 1)
       
       
      Show all issues

      This should probably be Mapping now.

    7. rbtools/api/resource/root.py (Diff revision 1)
       
       
      Show all issues

      Same here.

    8. 
        
    david
    maubin
    1. Ship It!
    2. 
        
    chipx86
    1. 
        
    2. rbtools/api/errors.py (Diff revisions 1 - 2)
       
       
       
       
      Show all issues

      We can probably remove the blank line now, since these don't run up against each other as much.

    3. rbtools/api/errors.py (Diff revisions 1 - 2)
       
       
       
       
      Show all issues

      Same here.

    4. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (4db098d)