pschanely / CrossHair

An analysis tool for Python that blurs the line between testing and type systems.
Other
1.03k stars 49 forks source link

Do not treat KeyboardInterrupt as an exception in code-under-analysis #206

Closed pschanely closed 2 months ago

pschanely commented 1 year ago

Is your feature request related to a problem? Please describe.

If you try to kill CrossHair early with a Ctrl-C, and it happens to be in the middle of running your code (which it usually is), CrossHair will catch the exception and consider it to be a problem with the code under analysis.

Describe the solution you'd like We should probably instead assume that KeyboardInterrupt is meant to stop crosshair itself.

Note that in extremely rare cases, the current behavior could be what's intended (verifying some helper function that explicitly raises the KeyboardInterrupt exception, for instance)

pschanely commented 2 months ago

This was fixed way back in 0.0.40