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: use generic types instead of typing #217

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

mkniewallner
Copy link
Collaborator

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

Since PEP 585 implemented in Python 3.9, generic types can be used for type annotations in replacement of their counterparts in typing module.

deptry supports Python >= 3.7, but thanks to from __future__ import annotations, it's possible to use those generic types on 3.7+.

@mkniewallner mkniewallner marked this pull request as ready for review November 25, 2022 00:33
@codecov-commenter
Copy link

Codecov Report

Merging #217 (3574c57) into main (ea7ba57) will decrease coverage by 0.4%.
The diff coverage is 95.8%.

@@           Coverage Diff           @@
##            main    #217     +/-   ##
=======================================
- Coverage   96.2%   95.7%   -0.5%     
=======================================
  Files         31      31             
  Lines        897     912     +15     
  Branches     201     203      +2     
=======================================
+ Hits         863     873     +10     
- Misses        22      26      +4     
- Partials      12      13      +1     
Impacted Files Coverage Δ
...ptry/imports/extractors/python_import_extractor.py 100.0% <ø> (ø)
...ry/imports/extractors/notebook_import_extractor.py 88.0% <66.6%> (-12.0%) ⬇️
deptry/cli.py 93.6% <100.0%> (ø)
deptry/config.py 100.0% <100.0%> (ø)
deptry/core.py 97.5% <100.0%> (ø)
deptry/dependency.py 91.2% <100.0%> (ø)
deptry/dependency_getter/base.py 95.0% <100.0%> (ø)
deptry/dependency_getter/pdm.py 100.0% <100.0%> (ø)
deptry/dependency_getter/pep_621.py 92.8% <100.0%> (ø)
deptry/dependency_getter/poetry.py 100.0% <100.0%> (ø)
... and 14 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@fpgmaas fpgmaas self-requested a review November 25, 2022 07:32
@mkniewallner mkniewallner merged commit 83ba733 into fpgmaas:main Nov 25, 2022
@fpgmaas fpgmaas mentioned this pull request Dec 27, 2022
@mkniewallner mkniewallner deleted the refactor/use-generic-types branch December 29, 2022 22:43
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.

3 participants