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

refactor: simplify dependency specification detector #654

Conversation

mkniewallner
Copy link
Collaborator

@mkniewallner mkniewallner commented Apr 1, 2024

Note

Review commit by commit is advised.

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!
  • Documentation in docs is updated

Description of changes

This is a preliminary refactoring for #641. I figured that we could simplify a bit the logic in the dependency specification detector by directly returning instances of DependencyGetter instead of an enum that is then handled in Core class.

This should make overriding requirements_files with requirements.in if detected a bit cleaner.

…tuple.

We already pass the real default value from the CLI, so this avoids
duplciating the default.
Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 91.8%. Comparing base (b8fd0e3) to head (597ad11).

Files Patch % Lines
python/deptry/core.py 50.0% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #654     +/-   ##
=======================================
+ Coverage   90.6%   91.8%   +1.2%     
=======================================
  Files         34      34             
  Lines        961     947     -14     
  Branches     195     197      +2     
=======================================
- Hits         871     870      -1     
+ Misses        73      60     -13     
  Partials      17      17             

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

@mkniewallner mkniewallner force-pushed the refactor/simplify-dependency-specification-detector branch from 9c65f61 to 7817ba3 Compare April 1, 2024 19:05
@mkniewallner mkniewallner merged commit 5494d09 into fpgmaas:main Apr 2, 2024
29 checks passed
@mkniewallner mkniewallner deleted the refactor/simplify-dependency-specification-detector branch April 2, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants