• 
      

    Add a get_spy method.

    Review Request #14606 — Created Sept. 10, 2025 and submitted — Latest diff uploaded

    Information

    kgb
    master

    Reviewers

    kgb

    Type checkers don't particularly like it when accessing data on a method
    which is provided by the spy, since they don't know that kgb has
    replaced the callable. This method can be used with the spied-on method
    to retrieve the spy in a way which does not get flagged by typing.

    Used this in some code and saw that the resulting checks were no longer
    showing warnings in my editor.

    Commits

    Files