def collecting_types(self): # type: () -> Iterator[None] collect_types.collected_args = {} collect_types.collected_signatures = {} collect_types.num_samples = {} collect_types.sampling_counters = {} collect_types.call_pending = set() collect_types.start() yield None collect_types.stop() self.load_stats()
def annotations_collect(): """Fixture to collect 'annotations' for pyannonate Yields: [None]: [Generates file annotations.txt] """ # pipx install pyannotate==1.2.0 from pyannotate_runtime import collect_types collect_types.init_types_collection() collect_types.start() yield None collect_types.stop() collect_types.dump_stats("annotations.txt")
def only_return(x): # type: (int) -> str collect_types.start() return ''