Attention: Patch coverage is 42.85714%
with 24 lines
in your changes missing coverage. Please review.
Project coverage is 57.23%. Comparing base (
b73d819
) to head (165a6db
).
Report is 1 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
onnx/compose.py | 0.00% | 10 Missing and 10 partials ⚠️ |
onnx/gen_proto.py | 0.00% | 2 Missing ⚠️ |
onnx/helper.py | 94.11% | 1 Missing ⚠️ |
onnx/utils.py | 66.66% | 1 Missing ⚠️ |
@@ Coverage Diff @@
## main #6470 +/- ##
=======================================
Coverage 57.23% 57.23%
=======================================
Files 507 507
Lines 31443 31445 +2
Branches 3542 3542
=======================================
+ Hits 17997 17999 +2
Misses 12597 12597
Partials 849 849
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
77 | 77 | @classmethod | |
78 | 78 | def is_compatible( | |
79 | cls, model: ModelProto, device: str = "CPU", **kwargs: Any # noqa: ARG003 | ||
79 | cls, | ||
80 | **kwargs: Any, |
Unused class method argument: kwargs
.
See https://docs.astral.sh/ruff/rules/unused-class-method-argument
85 | 86 | def prepare( | |
86 | cls, model: ModelProto, device: str = "CPU", **kwargs: Any # noqa: ARG003 | ||
87 | ) -> BackendRep | None: | ||
88 | # TODO Remove Optional from return type | ||
87 | cls, | ||
88 | model: ModelProto, | ||
89 | **kwargs: Any, |
Unused class method argument: kwargs
.
See https://docs.astral.sh/ruff/rules/unused-class-method-argument
670 | 672 | ||
671 | 673 | arr = func(array_flat[0::2], array_flat[1::2]) | |
672 | return arr.astype(np.uint8) # type: ignore[no-any-return] | ||
674 | return arr.astype(np.uint8) |
Returning Any from function declared to return "ndarray[Any, Any]"
To disable, use # type: ignore[no-any-return]
Argument 1 to "CopyFrom" of "TensorProto" has incompatible type "Any | None"; expected "Message"
To disable, use # type: ignore[arg-type]
410 | 410 | inits = {i.name for i in onx.graph.initializer} | |
411 | 411 | n_input = 0 | |
412 | 412 | inputs = [] | |
413 | for i in range(len(onx.graph.input)): | ||
414 | if onx.graph.input[i].name in inits: | ||
413 | for i, x in enumerate(onx.graph.input): |
Loop control variable i
not used within loop body.
See https://docs.astral.sh/ruff/rules/unused-loop-control-variable
387 | 387 | ||
388 | 388 | ||
389 | def float32_to_float8e4m3( # noqa: PLR0911 | ||
389 | def float32_to_float8e4m3( |
Too many return statements (9 > 6).
See https://docs.astral.sh/ruff/rules/too-many-return-statements
Thanks!
There is one lint error. Otherwise looks good to me
Login to write a write a comment.
Description
More robust type checking in Python.
Motivation and Context
For better code.