-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
name temporary files with a pattern which can be globbed #789
Comments
It used to be like this, but then that caused issues for importing modules The temporary files should be automatically cleaned up after nbqa finishes running though, is that not what you're seeing? |
can't reproduce this, even on windows - my only guess is that you repeatedly ran closing for now then, but thanks for the report |
No, I didn't Ctrl-C. nbQA just ran long enough for the IDE to see the file and stage it. |
I see - which IDE was it, just out of interest? Either way, I'd suggest reporting to them (or seeing if they have a way of increasing the time for temporary files) |
JetBrains IDEA. It would be closed as not an issue, because it's a feature. I've set up my IDE to add all files to VCS when they are created. |
doesn't this cause issues for you when using other tools that create temporary files, such as pytest or yesqa? |
Those are in .gitignore, so the IDE ignores them. nbQA is special since it creates a file in the same directory and with almost the same name, without any easy way to glob just for the temporary files. |
so if the temporary file names all started with the same pattern, such as if so, then sure, pull requests welcome |
Yeah, something like that would be great! |
cool, here's the contributing guide if you're interested in submitting a PR https://nbqa.readthedocs.io/en/latest/contributing.html |
When nbQA runs it extracts a
foo[randomness].py
file fromfoo.ipynb
, and puts this file in the same directory as the notebook. This confuses my IDE, which is set to add any new files to VCS. It would probably be better to put this in a temporary directory.The text was updated successfully, but these errors were encountered: