Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API to reset all; API to wrap all #28

Open
gvanrossum opened this issue Nov 21, 2017 · 0 comments
Open

API to reset all; API to wrap all #28

gvanrossum opened this issue Nov 21, 2017 · 0 comments

Comments

@gvanrossum
Copy link
Contributor

The init_types_collection() function installs the tracing callbacks and sets the filename filter, but doesn't reset the globals containing collected data. Maybe it should also do that. Or maybe we need a separate API to do that. (Currently the pyannotate unit tests reset a whole bunch of globals at the start of each test -- this should become a single call.)

Second, with collect_types.collect() only calls resume() and pause() -- we could use another context manager that calls init_types_collection() and dump_stats() as well.

(Note that the non-context-manager APIs are also important, e.g. for use in test fixtures, where there are traditionally separate setUp() and tearDown() methods.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant