Fix config file search and inclusion in header#2048
Fix config file search and inclusion in header#2048chrysle wants to merge 2 commits intojazzband:mainfrom
Conversation
685bcba to
0385403
Compare
0385403 to
db7b044
Compare
for more information, see https://pre-commit.ci
c1474fd to
cbc8f01
Compare
| working_directory = Path.cwd() | ||
| src_files_as_paths = ( | ||
| (working_directory / src_file).resolve() for src_file in src_files or (".",) | ||
| (working_directory / src_file).resolve() for src_file in src_files + (".",) |
There was a problem hiding this comment.
Could you explain this? Obviously, there's some unspecified side effect in external logic, but I don't get it.
There was a problem hiding this comment.
This adds the current working directory to the search path for source files as well, as proposed in the linked issue.
| src_files = click.argument( | ||
| "src_files", | ||
| nargs=-1, | ||
| is_eager=True, |
There was a problem hiding this comment.
See #1902 (comment). Making only src_files eager doesn't work though, as it won't pick up the config if not specified, then.
|
I'm going to pick this up and try to get it into shape to include in the 7.4.2 release. I think this is a basically good fix and just needs some cleanup. If I understand #1902, this is going down one of the viable paths. At a minimum, this needs
I'm also going to assess to see if we can do more in terms of the tests. |
|
After discussion, I'm moving this out of 7.4.2 to try to be very narrow in what extra work we include for a bugfix release. But I've assigned myself and plan to come back to it. |
Just stumbled over this issue again, so I thought I might as well fix it.
Closes #1902
Contributor checklist
Maintainer checklist
backwards incompatible,feature,enhancement,deprecation,bug,dependency,docsorskip-changelogas they determine changelog listing.