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

Support absolute paths in import completion skip list #968

Open
jgspratt opened this issue Aug 30, 2022 · 5 comments
Open

Support absolute paths in import completion skip list #968

jgspratt opened this issue Aug 30, 2022 · 5 comments

Comments

@jgspratt
Copy link

I get the high CPU from file scanning mentioned in #845 and #806 .

This surprised me because it must have started after an update and the first symptom was my CPU fan spinning on my MBP.

Is there any way to disable this scanning in my home dir? As another user mentioned, it's common to open bpython in the home dir, and people often have many repos checked out below their home dir.

A config option in the config file? A dot-file? Something in the .python-profile.py?

Is there any way to to this today? If not, I would like to request the feature.

# bpython
bpython version 0.23 on top of Python 3.10.6 /usr/local/opt/python@3.10/bin/python3.10
Running profile from ~/.python-profile.py
.python-profile.py loaded.
@sebastinas
Copy link
Contributor

sebastinas commented Aug 30, 2022

You can change import_completion_skiplist. Per default it's .git:.svn.hg:.config:.local:.share:node_modules:PlayOnLinux's virtual drives:dosdevices:__pycache__. If we are missing something there, I'm happy to add more.

@jgspratt
Copy link
Author

I'll try it. Could you document that on https://docs.bpython-interpreter.org/en/latest/configuration.html ?

Do I use the [general] section?

@sebastinas
Copy link
Contributor

It is and it's already documented at https://github.com/bpython/bpython/blob/main/doc/sphinx/source/configuration-options.rst#import_completion_skiplist. The live copy needs an update for the current version.

@jgspratt
Copy link
Author

I just excluded every dir in my home dir and it seems to have worked.

Does it support absolute paths? If so, could I exclude /Users/jgs and have the same result?

@sebastinas
Copy link
Contributor

It doesn't at the moment,. So let's keep this bug open until it also supports absolute paths.

@sebastinas sebastinas changed the title How to disable file scanning on startup? Support absolute paths in import completion skip list Aug 31, 2022
@sebastinas sebastinas added this to the New features milestone Aug 31, 2022
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

2 participants