-
-
Notifications
You must be signed in to change notification settings - Fork 779
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
Fix reload dir behavior #2598
base: master
Are you sure you want to change the base?
Fix reload dir behavior #2598
Conversation
if Path.cwd() not in directory.parents: | ||
self.reload_dirs.append(directory) | ||
if Path.cwd() not in self.reload_dirs: | ||
self.reload_dirs.append(Path.cwd()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that in order to correctly match the documentation you still need to add the cwd when config.reload_dirs is empty, so the code that you removed can be replaced with:
if not config.reload_dirs:
self.reload_dirs.append(Path.cwd())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I had there earlier, but it seems that Path.cwd()
is added somewhere else in the chain, this function never actually receives empty config.reload_dirs
, which is why I wasn't able to test this in any sensible way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i tried doing so in #2583 but it seems the maintainer has better things to do :/ since then i moved to a different library that handled reload dir in a sensible way |
Pretty rude considering your company leverages the contributions I've made to the ecosystem. |
Everyone appreciates your contributions! We're also trying to contribute back :) If you're busy with other things, that's ok. Everyone's been there, I've been there. I think, however, one should aim to communicate with their community on the timescale they expect things to happen. If the community finds an issue in the project they want to fix, and they offer the fix to you, it's (I'm not going to say common) decency to acknowledge them. In the same way you expect people to appreciate your contributions make them feel like their contributions are appreciated. I talk in ideas of course, who among us is perfect. |
Summary
This PR fixes the behavior of
--reload-dir
to match the documentation. The documentation states:also:
However, the current implementation always adds
Path.cwd()
to list of watched directories. This is undesirable and contradicts the documentation.Path.cwd()
should only be added as a default when no--reload-dir
is specified.Checklist