Skip to content

Commit b7265cb

Browse files
author
Michael Johansen
committed
Fix linting errors and comments.
Signed-off-by: Michael Johansen <[email protected]>
1 parent c9c3d74 commit b7265cb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/nipanel/converters/protobuf_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,9 @@ def protobuf_message(self) -> Type[vector_pb2.Vector]:
441441
return vector_pb2.Vector
442442

443443
def to_protobuf_message(self, python_value: Vector[Any]) -> vector_pb2.Vector:
444-
"""Convert the Python Scalar to a protobuf scalar_pb2.Scalar."""
444+
"""Convert the Python Vector to a protobuf vector_pb2.Vector."""
445445
return vector_conversion.vector_to_protobuf(python_value)
446446

447447
def to_python_value(self, protobuf_message: vector_pb2.Vector) -> Vector[_AnyScalarType]:
448-
"""Convert the protobuf message to a Python Scalar."""
448+
"""Convert the protobuf message to a Python Vector."""
449449
return vector_conversion.vector_from_protobuf(protobuf_message)

tests/unit/test_convert.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,8 @@ def test___scalar_proto___from_any___valid_python_scalar() -> None:
466466
def test___vector_proto___from_any___valid_python_vector() -> None:
467467
attrs = {"NI_UnitDescription": attribute_value_pb2.AttributeValue(string_value="amps")}
468468
pb_value = vector_pb2.Vector(
469-
attributes=attrs, double_array=array_pb2.DoubleArray(values=[1.0, 2.0, 3.0]),
469+
attributes=attrs,
470+
double_array=array_pb2.DoubleArray(values=[1.0, 2.0, 3.0]),
470471
)
471472
packed_any = _pack_into_any(pb_value)
472473

0 commit comments

Comments
 (0)