• 
      

    Add types, update signatures, and modernize docs for rbtools.utils.diffs.

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

    Information

    RBTools
    release-4.x

    Reviewers

    rbtools.utils.diffs is used in a lot of diff-generation code, and is
    sensitive to string types. These functions are old, lacking modern docs,
    and contain positional arguments that are non-obvious.

    This change adds type annotations to all the functions in here. It also
    updates all documentation for our modern standards, and switches some
    parameters to keyword-only (deprecating but still allowing them as
    positional arguments).

    Unit tests pass on Python 3.7-3.11.

    Summary ID
    Add types, update signatures, and modernize docs for rbtools.utils.diffs.
    `rbtools.utils.diffs` is used in a lot of diff-generation code, and is sensitive to string types. These functions are old, lacking modern docs, and contain positional arguments that are non-obvious. This change adds type annotations to all the functions in here. It also updates all documentation for our modern standards, and switches some parameters to keyword-only (deprecating but still allowing them as positional arguments).
    ef26f047fec428e7a8895f467c1d54272367830d
    Description From Last Updated

    as keyword arguments -> as a keyword argument

    daviddavid

    Shouldn't file_index_re have to come after the * in order to be a required keyword argument?

    maubinmaubin
    david
    1. 
        
    2. rbtools/utils/diffs.py (Diff revision 1)
       
       
      Show all issues

      as keyword arguments -> as a keyword argument

    3. 
        
    chipx86
    maubin
    1. 
        
    2. rbtools/utils/diffs.py (Diff revision 2)
       
       
       
      Show all issues

      Shouldn't file_index_re have to come after the * in order to be a required keyword argument?

      1. Oops, yeah. I actually intended for that to not have to be a keyword argument. I'll just update the docstring.

    3. 
        
    chipx86
    maubin
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-4.x (4649ec7)