agronholm / typeguard

Run-time type checker for Python
Other
1.55k stars 114 forks source link

Use environment variable TYPEGUARD_DISABLE to disable typeguard. #475

Open tage64 opened 3 months ago

tage64 commented 3 months ago

Changes

Setting the environment variable TYPEGUARD_DISABLE disables Typeguard and has the same effect as running Python with the -O flag.

I wanted to compile my Python program with Nuitka which removes the source code so that the inspect module doesn't work. However, I did not want to disable all assertians with the -O flag.

Checklist

coveralls commented 2 weeks ago

Coverage Status

coverage: 94.458% (-0.05%) from 94.511% when pulling 859a611d82d882037894447c8dc5107903092b0b on tage64:master into b6a7e4387c30a9f7d635712157c889eb073c1ea3 on agronholm:master.