-
Notifications
You must be signed in to change notification settings - Fork 815
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: allow dot files with --package-suffixes
#1742
Conversation
Testing[636] @ aada8b1 |
Testing[636] @ aada8b1 had 7 FAILUREs. |
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.
One possible alternative but mergeable in both cases.
@@ -88,8 +88,6 @@ def _walk(self, root, exclude_hidden=True, suffixes=None): | |||
# if path and (path[0] == '.' or './' in path): | |||
# continue | |||
for fname in files: |
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.
maybe a slightly safer and less expensive check would be something like:
if (fname[0] == "." and fname in suffixes) or (fname[0] != "." and any(fname.endswith(suffix) for suffix in suffixes):
This would restrict to including just files like .env
and not check all random . files.
But am fine with this change as well.
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.
going with your suggestion as the initial implementation ended up including arbitrary hidden files with known extensions, e.g. .hidden.py
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.
Good point -- I hadn't even thought of that.
9e31719
allow files that start with . to be added via
--package-suffixes
closes #1741