Closed jonbarker68 closed 1 year ago
Merging #283 (e0aaac2) into main (f8b7e09) will decrease coverage by
0.10%
. The diff coverage is96.62%
.
@@ Coverage Diff @@
## main #283 +/- ##
==========================================
- Coverage 92.41% 92.32% -0.10%
==========================================
Files 41 41
Lines 3798 3831 +33
==========================================
+ Hits 3510 3537 +27
- Misses 288 294 +6
Impacted Files | Coverage Δ | |
---|---|---|
clarity/enhancer/gha/gainrule_camfit.py | 94.11% <85.71%> (-0.55%) |
:arrow_down: |
clarity/evaluator/haspi/haspi.py | 96.77% <85.71%> (-3.23%) |
:arrow_down: |
clarity/evaluator/haspi/ebm.py | 98.54% <87.50%> (-0.71%) |
:arrow_down: |
clarity/evaluator/hasqi/hasqi.py | 94.73% <87.50%> (-5.27%) |
:arrow_down: |
clarity/evaluator/haaqi/haaqi.py | 88.63% <88.88%> (-1.37%) |
:arrow_down: |
...r_noise_simulator/carnoise_parameters_generator.py | 94.73% <94.11%> (+0.09%) |
:arrow_up: |
clarity/enhancer/nalr.py | 88.63% <94.73%> (ø) |
|
clarity/evaluator/haspi/eb.py | 90.16% <97.72%> (-0.04%) |
:arrow_down: |
clarity/data/HOA_tools_cec2.py | 97.09% <100.00%> (ø) |
|
clarity/data/scene_builder_cec2.py | 97.66% <100.00%> (+<0.01%) |
:arrow_up: |
... and 17 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Refactoring and fixes to handle all issues raised by MyPy
After this PR,
mypy
should run without finding any issuesSummary of what's been done:
Functions expecting arrays have been typed as
np.ndarray
. These functions could have been typed withArrayLike
https://numpy.org/devdocs/reference/typing.html, which would allow them to accept lists as well as arrays. But this requires a lot of fussy code likex = x_input.asarray()
at the start of every function and if it is not done consistently it can be hard for users to know which functions accpet lists and which don't. Better if is the user's responsibility to convert lists to arrays before calling.