Closed adriangb closed 2 years ago
Merging #68 (a8c12e6) into main (f00205b) will increase coverage by
0.02%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #68 +/- ##
==========================================
+ Coverage 97.70% 97.73% +0.02%
==========================================
Files 50 51 +1
Lines 2007 2033 +26
Branches 329 333 +4
==========================================
+ Hits 1961 1987 +26
Misses 37 37
Partials 9 9
Impacted Files | Coverage Δ | |
---|---|---|
di/dependant.py | 100.00% <100.00%> (ø) |
|
tests/test_injectable_class.py | 100.00% <100.00%> (ø) |
This makes it easier to make use of the API introduced in #65 by allowing users to simply subclass a base class and pass in parameters to
__init_subclass__
.The alternative is something like:
This is less verbose, has less imports, propagates to subclasses and allows a single object (the type itself) to be used to construct the object directly as well as for dependency injection