• 
      

    Add a get_spy method.

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

    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.

    Summary ID
    Add a get_spy method.
    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. Testing Done: Used this in some code and saw that the resulting checks were no longer showing warnings in my editor.
    omuuzqmmvopoxrmzxxlsxlnursuqzlkk
    maubin
    1. Ship It!
    2. 
        
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (e3231d0)