Use environment variable TYPEGUARD_DISABLE to disable typeguard.
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
- [X] You've added tests (in
tests/) added which would fail without your patch - [X] You've updated the documentation (in
docs/, in case of behavior changes or new features) - [X] You've added a new changelog entry (in
docs/versionhistory.rst).
coverage: 94.458% (-0.05%) from 94.511% when pulling 859a611d82d882037894447c8dc5107903092b0b on tage64:master into b6a7e4387c30a9f7d635712157c889eb073c1ea3 on agronholm:master.
@agronholm Why isn't this merged yet? Is there a problem/conflict/etc. with this PR?
Because 1) I have plenty of other projects to maintain too, 2) I want to understand the feature and decide if I want it and if the it's the right approach.
Ok, I just wanted to know if there is any work to do to make this PR acceptable. Apparently not at this moment, thanks for the reply.