dropbox / pyannotate

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

WIP Enable configuration of TOP_DIR #111

Open gotcha opened 3 years ago

gotcha commented 3 years ago

used by default_filter_filename.

The test suite of my tool runs forked processes in a temporary directory (via tempfile.mkdtemp) which does not share the same root directory as the test suite. This implies all calls are filtered out by default_filter_filename.

Adding the set_top_dir was enough to avoid filtering out.

This is a simple enough way to work around the little naive assumption made by:

TOP_DIR = os.path.join(os.getcwd(), '')     # current dir with trailing slash

Would you see a better solution ?

gotcha commented 3 years ago

I have moved the definition of the variables closer to where they are used.

See #112 to avoid global vars while still enabling top_dir customization.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.