Skip to content
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(core): use rglob to guess local Python modules #753

Merged
merged 2 commits into from
Jul 5, 2024

Conversation

mkniewallner
Copy link
Collaborator

@mkniewallner mkniewallner commented Jul 5, 2024

Resolves #740.

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added or modified a feature, documentation in docs is updated

Description of changes

deptry doesn't play well with cases where Python packages use PEP 420 and do not have any Python file in the top directory, like shown in the linked issue. I've added a test case that, without the 2nd commit, fails. Using rglob instead of glob for determining if a directory is a Python package ensures that we recursively search directories, instead of stopping at the first level.

@mkniewallner mkniewallner marked this pull request as ready for review July 5, 2024 00:48
@mkniewallner mkniewallner requested a review from fpgmaas July 5, 2024 00:48
Copy link

codecov bot commented Jul 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.8%. Comparing base (9ffb0eb) to head (acefa49).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #753   +/-   ##
=====================================
  Coverage   92.8%   92.8%           
=====================================
  Files         35      35           
  Lines        920     920           
  Branches     165     165           
=====================================
  Hits         854     854           
  Misses        52      52           
  Partials      14      14           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mkniewallner mkniewallner merged commit 0820845 into fpgmaas:main Jul 5, 2024
20 checks passed
@mkniewallner mkniewallner deleted the fix/issue-740 branch July 5, 2024 07:46
mkniewallner added a commit that referenced this pull request Aug 7, 2024
mkniewallner added a commit that referenced this pull request Aug 7, 2024
mkniewallner added a commit that referenced this pull request Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PEP420 namespaces aren't recognized
2 participants