Skip to content

Commit

Permalink
Don't trace __main__ and we don't know its real name
Browse files Browse the repository at this point in the history
  • Loading branch information
vodik committed Jan 7, 2018
1 parent b68e087 commit e8bb8a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions monkeytype/tracing.py
Expand Up @@ -240,6 +240,7 @@ def __call__(self, frame: FrameType, event: str, arg: Any) -> 'CallTracer':
code = frame.f_code
if (
event not in SUPPORTED_EVENTS or
frame.f_globals.get('__name__') == '__main__' or
code.co_name == 'trace_types' or
self.should_trace and not self.should_trace(code)
):
Expand Down

0 comments on commit e8bb8a6

Please sign in to comment.