add parenthesis to serve.proc_nbs #1375
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While I was looking at another issue, I noticed that we are missing parenthesis on one of the .exists function calls. I pointed this out and Jeremy asked me to put in a PR to fix.
I'm going to just put in the single change that I mentioned, but I also noticed that the functions in serve aren't really being tested either (at least in isolation). I was looking at adding some tests, but I think it will be challenging with the current function because we rely on the cfg.config_path. I believe we could make it a lot easier to test by using a cache_path in a similar way to how we use path for nbs currently. If we made that more flexible, we could create a temporary directory and point to that directory and then ensure that the behavior is how we expect it to be. If there is interest in something like that, let me know and I would be happy to work on it, but I didn't want to make this PR murky since it's so straightforward.