Skip to content

Commit

Permalink
Fix Lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Blahpapto1 committed Nov 29, 2024
1 parent 4819110 commit 14c3349
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ def get_configuration_and_output_metadata_by_index(
"""Returns the configuration and output metadata of the measurement."""
configuration_parameter_list = []
for configuration in metadata.measurement_signature.configuration_parameters:
if configuration.message_type and configuration.message_type != "ni.protobuf.types.Double2DArray":
if (
configuration.message_type
and configuration.message_type != "ni.protobuf.types.Double2DArray"
):
raise click.ClickException(
f"Measurement configurations do not support message data types ({configuration.message_type} is unsupported)."
)
Expand Down Expand Up @@ -274,7 +277,7 @@ def get_configuration_parameters_with_type_and_default_values(
else:
enum_value = next((e.name for e in enum_type if e.value == default_value), None)
default_value = f"{parameter_type}.{enum_value}"

if metadata.message_type and metadata.message_type == "ni.protobuf.types.Double2DArray":
parameter_type = "Double2DArray"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
from typing import Any, Generator, Tuple, Type, Union

import pytest
from ni_measurement_plugin_sdk_service._internal.stubs.ni.protobuf.types import (
array_pb2,
)
from ni_measurement_plugin_sdk_service.measurement.service import MeasurementService

from tests.conftest import CliRunnerFunction
from tests.utilities.discovery_service_process import DiscoveryServiceProcess
from tests.utilities.measurements import non_streaming_data_measurement
from ni_measurement_plugin_sdk_service._internal.stubs.ni.protobuf.types import (
array_pb2,
)


class EnumInEnum(Enum):
"""EnumInEnum used for enum-typed measurement configs and outputs."""
Expand Down

0 comments on commit 14c3349

Please sign in to comment.