Finistere / antidote

Dependency injection for Python
MIT License
90 stars 9 forks source link

Fix injection error with some type hints #57

Closed Finistere closed 2 years ago

Finistere commented 2 years ago

Current check for optional type hints relied on isinstance. However, several type hints such as List[str] cannot be used with it. Replaced it with a is type(None) check instead.

Fixes #56

codecov-commenter commented 2 years ago

Codecov Report

Merging #57 (c8b3a20) into master (5a183d4) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #57   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           71        71           
  Lines         3991      3992    +1     
  Branches       681       681           
=========================================
+ Hits          3991      3992    +1     
Impacted Files Coverage Δ
src/antidote/_internal/utils/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5a183d4...c8b3a20. Read the comment docs.