fix: :bug: do not exclude files in explicitly included directorys
Resolves: python-poetry#10259
- [ ] Added tests for changed code.
- [ ] Updated documentation for changed code.
Summary by Sourcery
Bug Fixes:
- Ensures that files within explicitly included directories are not ignored during the build process.
Reviewer's Guide by Sourcery
This pull request introduces a new method, _get_ignored_files, to accurately determine ignored files during the build process. It considers VCS ignores, explicit excludes, and, most importantly, explicit includes, ensuring that files within explicitly included directories are not inadvertently excluded. The find_excluded_files method is refactored to leverage this new method, improving the accuracy of file exclusion during the build process.
Updated class diagram for Builder
classDiagram
class Builder {
-_path: Path
-_poetry: Poetry
-_env: Env
-_excluded_files: set[str] | None
-_package: Package
+build(target_dir: Path | None) : Path
+find_excluded_files(fmt: str | None = None) : set[str]
-_apply_local_version_label() : None
-_get_ignored_files(vcs_ignored_files, explicitly_excluded, explicitly_included) : set[str]
}
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Introduces a new method to determine ignored files, taking into account VCS ignores, explicit excludes, and explicit includes. |
|
src/poetry/core/masonry/builders/builder.py |
Refactors the find_excluded_files method to use the new _get_ignored_files method. |
|
src/poetry/core/masonry/builders/builder.py |
Tips and commands
Interacting with Sourcery
-
Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
-
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it. -
Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. You can also comment@sourcery-ai titleon the pull request to (re-)generate the title at any time. -
Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment@sourcery-ai summaryon the pull request to (re-)generate the summary at any time. -
Generate reviewer's guide: Comment
@sourcery-ai guideon the pull request to (re-)generate the reviewer's guide at any time. -
Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore. -
Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment@sourcery-ai reviewto trigger a new review! -
Generate a plan of action for an issue: Comment
@sourcery-ai planon an issue to generate a plan of action for it.
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
NVM using poetry_test_issue_10259/myLibs/**/* works 🙃🙃🙃
do what ever you want with this code
maybe, could we add to the documentation that globing is supported for including/excluding files within the pyproject.toml?