Code Cleanup and Improved Tests #8
ci.yaml
on: pull_request
Annotations
10 errors
type-check:
build/lib/luxonis_train/__main__.py#L183
Argument of type "str | None" cannot be assigned to parameter "distribution_name" of type "str" in function "version"
Type "str | None" is not assignable to type "str"
"None" is not assignable to "str" (reportArgumentType)
|
type-check:
build/lib/luxonis_train/attached_modules/visualizers/utils.py#L64
Type "MatLike | NDArray[unsignedinteger[_8Bit]]" is not assignable to return type "NDArray[uint8]"
Type "MatLike | NDArray[unsignedinteger[_8Bit]]" is not assignable to type "NDArray[uint8]"
"ndarray[Any, dtype[integer[Any] | floating[Any]]]" is not assignable to "ndarray[Any, dtype[uint8]]"
Type parameter "_DType_co@ndarray" is covariant, but "dtype[integer[Any] | floating[Any]]" is not a subtype of "dtype[uint8]"
"dtype[integer[Any] | floating[Any]]" is not assignable to "dtype[uint8]"
Type parameter "_DTypeScalar_co@dtype" is covariant, but "integer[Any] | floating[Any]" is not a subtype of "uint8" (reportReturnType)
|
type-check:
build/lib/luxonis_train/callbacks/metadata_logger.py#L60
No overloads for "join" match the provided arguments (reportCallIssue)
|
type-check:
build/lib/luxonis_train/callbacks/metadata_logger.py#L60
Argument of type "str | None" cannot be assigned to parameter "a" of type "StrPath" in function "join" (reportArgumentType)
|
type-check:
build/lib/luxonis_train/core/core.py#L183
Argument of type "Self@LuxonisModel" cannot be assigned to parameter "_core" of type "LuxonisModel | None" in function "__init__"
Type "Self@LuxonisModel" is not assignable to type "LuxonisModel | None"
"LuxonisModel*" is not assignable to "LuxonisModel"
"LuxonisModel*" is not assignable to "None" (reportArgumentType)
|
type-check:
build/lib/luxonis_train/core/core.py#L456
Argument of type "Self@LuxonisModel" cannot be assigned to parameter "_core" of type "LuxonisModel | None" in function "__init__"
Type "Self@LuxonisModel" is not assignable to type "LuxonisModel | None"
"LuxonisModel*" is not assignable to "LuxonisModel"
"LuxonisModel*" is not assignable to "None" (reportArgumentType)
|
type-check:
build/lib/luxonis_train/utils/config.py#L117
Cannot assign to attribute "nodes" for class "ModelConfig*"
Expression of type "list[luxonis_train.utils.config.ModelNodeConfig | build.lib.luxonis_train.utils.config.ModelNodeConfig]" cannot be assigned to attribute "nodes" of class "ModelConfig"
Attribute "__set__" is unknown
"list[luxonis_train.utils.config.ModelNodeConfig | build.lib.luxonis_train.utils.config.ModelNodeConfig]" is not assignable to "list[ModelNodeConfig]"
Type parameter "_T@list" is invariant, but "luxonis_train.utils.config.ModelNodeConfig | build.lib.luxonis_train.utils.config.ModelNodeConfig" is not the same as "ModelNodeConfig"
Consider switching from "list" to "Sequence" which is covariant (reportAttributeAccessIssue)
|
type-check:
build/lib/luxonis_train/utils/config.py#L118
Cannot assign to attribute "losses" for class "ModelConfig*"
Expression of type "list[luxonis_train.utils.config.LossModuleConfig | build.lib.luxonis_train.utils.config.LossModuleConfig]" cannot be assigned to attribute "losses" of class "ModelConfig"
Attribute "__set__" is unknown
"list[luxonis_train.utils.config.LossModuleConfig | build.lib.luxonis_train.utils.config.LossModuleConfig]" is not assignable to "list[LossModuleConfig]"
Type parameter "_T@list" is invariant, but "luxonis_train.utils.config.LossModuleConfig | build.lib.luxonis_train.utils.config.LossModuleConfig" is not the same as "LossModuleConfig"
Consider switching from "list" to "Sequence" which is covariant (reportAttributeAccessIssue)
|
type-check:
build/lib/luxonis_train/utils/config.py#L119
Cannot assign to attribute "metrics" for class "ModelConfig*"
Expression of type "list[luxonis_train.utils.config.MetricModuleConfig | build.lib.luxonis_train.utils.config.MetricModuleConfig]" cannot be assigned to attribute "metrics" of class "ModelConfig"
Attribute "__set__" is unknown
"list[luxonis_train.utils.config.MetricModuleConfig | build.lib.luxonis_train.utils.config.MetricModuleConfig]" is not assignable to "list[MetricModuleConfig]"
Type parameter "_T@list" is invariant, but "luxonis_train.utils.config.MetricModuleConfig | build.lib.luxonis_train.utils.config.MetricModuleConfig" is not the same as "MetricModuleConfig"
Consider switching from "list" to "Sequence" which is covariant (reportAttributeAccessIssue)
|
type-check:
build/lib/luxonis_train/utils/config.py#L120
Cannot assign to attribute "visualizers" for class "ModelConfig*"
Expression of type "list[luxonis_train.utils.config.AttachedModuleConfig | build.lib.luxonis_train.utils.config.AttachedModuleConfig]" cannot be assigned to attribute "visualizers" of class "ModelConfig"
Attribute "__set__" is unknown
"list[luxonis_train.utils.config.AttachedModuleConfig | build.lib.luxonis_train.utils.config.AttachedModuleConfig]" is not assignable to "list[AttachedModuleConfig]"
Type parameter "_T@list" is invariant, but "luxonis_train.utils.config.AttachedModuleConfig | build.lib.luxonis_train.utils.config.AttachedModuleConfig" is not the same as "AttachedModuleConfig"
Consider switching from "list" to "Sequence" which is covariant (reportAttributeAccessIssue)
|