dropbox / pyannotate

Auto-generate PEP-484 annotations
Apache License 2.0
1.42k stars 59 forks source link

Problem: TOP_DIR_x are global #112

Open gotcha opened 3 years ago

gotcha commented 3 years ago

In the context of @gvanrossum comment on #111, I looked a bit closer to the globals TOP_DIR_x.

IMHO, it is not needed to keep them global.

This PR would replace #111. (Nevertheless, I fixed #111 in order to let you decide which one you prefer.)

The code in this PR enables customizing the default_filter_filename top_dirwith the following code:

top_filter = collect_types.configure_default_filter_top_dir(top_dir)
collect_types.init_types_collection(filter_filename=top_filter)
CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.