• 
      

    Don't use mutable defaults for SCMClient methods.

    Review Request #14471 — Created June 24, 2025 and submitted — Latest diff uploaded

    Information

    RBTools
    master

    Reviewers

    This change updates the parse_revision_spec, diff, and
    create_commit methods for SCMClients to avoid using mutable lists as
    defaults for arguments. These are now set to use
    (Sequence[str] | None) = None, and initialize the values in the body
    of the method instead.

    Because all "real" call sites pass these in (as empty lists), I've
    added deprecation warnings that we will be removing the default value
    (and the | None) in rbtools 8.

    Ran unit tests.

    Commits

    Files