typeguard icon indicating copy to clipboard operation
typeguard copied to clipboard

Use environment variable TYPEGUARD_DISABLE to disable typeguard.

Open tage64 opened this issue 1 year ago • 4 comments

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).

tage64 avatar Jul 31 '24 17:07 tage64

Coverage Status

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

coveralls avatar Nov 12 '24 19:11 coveralls

@agronholm Why isn't this merged yet? Is there a problem/conflict/etc. with this PR?

JohannesK71083 avatar Feb 13 '25 18:02 JohannesK71083

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.

agronholm avatar Feb 14 '25 21:02 agronholm

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.

JohannesK71083 avatar Feb 14 '25 21:02 JohannesK71083