Repository: ni/measurement-plugin-python (language: python)

Issue:
Re-run ni-python-styleguide on examples
- [x] This contribution adheres to [CONTRIBUTING.md](https://github.com/ni/measurement-services-python/blob/main/CONTRIBUTING.md).

### What does this Pull Request accomplish?

Recent changes to Black flagged our examples as needing updates.

### Why should this Pull Request be merged?

Fix the check examples action.

### What testing has been done?

Ran 'poetry run ni-python-styleguide fix' for each example. These are the results.


Discussion / hints:
## Test Results
    30 files      30 suites   35m 42s :stopwatch:
   557 tests    556 :white_check_mark:     1 :zzz: 0 :x:
13 690 runs  12 620 :white_check_mark: 1 070 :zzz: 0 :x:

Results for commit a8286421.

[test-results]:data:application/gzip;base64,H4sIAOrit2UC/03MyQrDIBSF4VcJrrtwvJq+TDEOIM1QHFal714TEs3y/w6cL/Jhdgk9B4YfA0ol5F62RJ3DttamhNMqdcz7LIS86pWKMQdBp3f4VCINvA5zBdzAxbjFU2JZ90/CYLzyOiUUaLfzFctGt9+j77dmW5aQayCtqAJOidPKC8s949phmMCB4VJaOxnllB8Z+v0BQ44xwQ8BAAA=


Fix patch:
diff --git a/_docs_source/conf.py b/_docs_source/conf.py
index 4351ddc40..9b20d07e9 100644
--- a/_docs_source/conf.py
+++ b/_docs_source/conf.py
@@ -1,4 +1,5 @@
 """Sphinx Configuration File."""
+
 import datetime
 import pathlib
 
diff --git a/ni_measurementlink_service/__init__.py b/ni_measurementlink_service/__init__.py
index 4bc95d2d7..463da0cdd 100644
--- a/ni_measurementlink_service/__init__.py
+++ b/ni_measurementlink_service/__init__.py
@@ -1,17 +1,14 @@
 """MeasurementLink Support for Python."""
+
 import logging
 
-from ni_measurementlink_service import (
-    session_management,
-)
+from ni_measurementlink_service import session_management
 from ni_measurementlink_service.measurement.info import (
     DataType,
     MeasurementInfo,
     ServiceInfo,
 )
-from ni_measurementlink_service.measurement.service import (
-    MeasurementService,
-)
+from ni_measurementlink_service.measurement.service import MeasurementService
 
 __all__ = [
     "session_management",
diff --git a/ni_measurementlink_service/_configuration.py b/ni_measurementlink_service/_configuration.py
index 1143d9016..529d51ed3 100644
--- a/ni_measurementlink_service/_configuration.py
+++ b/ni_measurementlink_service/_configuration.py
@@ -1,4 +1,5 @@
 """MeasurementLink configuration options."""
+
 from __future__ import annotations
 
 import sys
diff --git a/ni_measurementlink_service/_drivers/__init__.py b/ni_measurementlink_service/_drivers/__init__.py
index ba7e655ef..24d15b07d 100644
--- a/ni_measurementlink_service/_drivers/__init__.py
+++ b/ni_measurementlink_service/_drivers/__init__.py
@@ -1,10 +1,13 @@
 """Shared code for interfacing with driver APIs."""
+
 from __future__ import annotations
 
 import contextlib
 from typing import ContextManager, TypeVar
 
-from ni_measurementlink_service.session_management._types import SessionInitializationBehavior
+from ni_measurementlink_service.session_management._types import (
+    SessionInitializationBehavior,
+)
 
 TSession = TypeVar("TSession")
 
diff --git a/ni_measurementlink_service/_drivers/_grpcdevice.py b/ni_measurementlink_service/_drivers/_grpcdevice.py
index ead0eb778..600d97b4f 100644
--- a/ni_measurementlink_service/_drivers/_grpcdevice.py
+++ b/ni_measurementlink_service/_drivers/_grpcdevice.py
@@ -1,4 +1,5 @@
 """Shared functions for interacting with NI gRPC Device Server."""
+
 from __future__ import annotations
 
 import logging
diff --git a/ni_measurementlink_service/_featuretoggles.py b/ni_measurementlink_service/_featuretoggles.py
index 3ae0af39e..fac3b2790 100644
--- a/ni_measurementlink_service/_featuretoggles.py
+++ b/ni_measurementlink_service/_featuretoggles.py
@@ -1,4 +1,5 @@
 """MeasurementLink feature toggles."""
+
 from __future__ import annotations
 
 import functools
@@ -6,7 +7,7 @@
 from enum import Enum
 from typing import TYPE_CHECKING, Callable, TypeVar
 
-from ni_measurementlink_service._configuration import _config, _PREFIX
+from ni_measurementlink_service._configuration import _PREFIX, _config
 
 if TYPE_CHECKING:
     if sys.version_info >= (3, 10):
diff --git a/ni_measurementlink_service/_internal/grpc_servicer.py b/ni_measurementlink_service/_internal/grpc_servicer.py
index ec56b8981..fcbf10c08 100644
--- a/ni_measurementlink_service/_internal/grpc_servicer.py
+++ b/ni_measurementlink_service/_internal/grpc_servicer.py
@@ -1,4 +1,5 @@
 """gRPC servicers for each version of the measurement service interface."""
+
 from __future__ import annotations
 
 import collections.abc
diff --git a/ni_measurementlink_service/_internal/parameter/metadata.py b/ni_measurementlink_service/_internal/parameter/metadata.py
index 2a7e4ae6b..0372fe69c 100644
--- a/ni_measurementlink_service/_internal/parameter/metadata.py
+++ b/ni_measurementlink_service/_internal/parameter/metadata.py
@@ -1,4 +1,5 @@
 """Contains classes that represents metadata."""
+
 import json
 from enum import Enum
 from typing import Any, Dict, Iterable, NamedTuple
diff --git a/ni_measurementlink_service/_internal/parameter/serialization_strategy.py b/ni_measurementlink_service/_internal/parameter/serialization_strategy.py
index fd7023d2a..de0e8b60b 100644
--- a/ni_measurementlink_service/_internal/parameter/serialization_strategy.py
+++ b/ni_measurementlink_service/_internal/parameter/serialization_strategy.py
@@ -1,4 +1,5 @@
 """Serialization Strategy."""
+
 from __future__ import annotations
 
 from typing import Any, Optional, cast
diff --git a/ni_measurementlink_service/discovery/_client.py b/ni_measurementlink_service/discovery/_client.py
index 2a13e78a8..08de16d87 100644
--- a/ni_measurementlink_service/discovery/_client.py
+++ b/ni_measurementlink_service/discovery/_client.py
@@ -1,4 +1,5 @@
 """Client for accessing the MeasurementLink discovery service."""
+
 import logging
 import threading
 from typing import Optional
diff --git a/ni_measurementlink_service/discovery/_support.py b/ni_measurementlink_service/discovery/_support.py
index 22ebcde92..1ba87a82c 100644
--- a/ni_measurementlink_service/discovery/_support.py
+++ b/ni_measurementlink_service/discovery/_support.py
@@ -1,4 +1,5 @@
 """Support functions for the MeasurementLink discovery service."""
+
 import json
 import logging
 import os
diff --git a/ni_measurementlink_service/discovery/_types.py b/ni_measurementlink_service/discovery/_types.py
index 7ba5c27f4..a3473c0fe 100644
--- a/ni_measurementlink_service/discovery/_types.py
+++ b/ni_measurementlink_service/discovery/_types.py
@@ -1,4 +1,5 @@
 """Data types for the MeasurementLink discovery service."""
+
 import typing
 
 
diff --git a/ni_measurementlink_service/measurement/info.py b/ni_measurementlink_service/measurement/info.py
index 6716f292f..e7e29e5ac 100644
--- a/ni_measurementlink_service/measurement/info.py
+++ b/ni_measurementlink_service/measurement/info.py
@@ -1,4 +1,5 @@
 """Measurement service metadata classes and enums."""
+
 from __future__ import annotations
 
 import enum
diff --git a/ni_measurementlink_service/session_management/__init__.py b/ni_measurementlink_service/session_management/__init__.py
index 9ccfd0624..faf965373 100644
--- a/ni_measurementlink_service/session_management/__init__.py
+++ b/ni_measurementlink_service/session_management/__init__.py
@@ -1,4 +1,5 @@
 """Public API for accessing the MeasurementLink session management service."""
+
 from __future__ import annotations
 
 import warnings
diff --git a/ni_measurementlink_service/session_management/_client.py b/ni_measurementlink_service/session_management/_client.py
index 4a9c18ab9..07a6c801c 100644
--- a/ni_measurementlink_service/session_management/_client.py
+++ b/ni_measurementlink_service/session_management/_client.py
@@ -1,4 +1,5 @@
 """Session management client class."""
+
 from __future__ import annotations
 
 import logging
diff --git a/ni_measurementlink_service/session_management/_reservation.py b/ni_measurementlink_service/session_management/_reservation.py
index 4bd6e7d63..a6cbd382f 100644
--- a/ni_measurementlink_service/session_management/_reservation.py
+++ b/ni_measurementlink_service/session_management/_reservation.py
@@ -1,4 +1,5 @@
 """Session management reservation classes."""
+
 from __future__ import annotations
 
 import abc
diff --git a/ni_measurementlink_service/session_management/_types.py b/ni_measurementlink_service/session_management/_types.py
index 286148851..d5653f915 100644
--- a/ni_measurementlink_service/session_management/_types.py
+++ b/ni_measurementlink_service/session_management/_types.py
@@ -1,4 +1,5 @@
 """Session management data types."""
+
 from __future__ import annotations
 
 from enum import IntEnum


Test patch:
diff --git a/tests/acceptance/conftest.py b/tests/acceptance/conftest.py
index dde5d26de..4d326fce3 100644
--- a/tests/acceptance/conftest.py
+++ b/tests/acceptance/conftest.py
@@ -1,4 +1,5 @@
 """Pytest configuration file for acceptance tests."""
+
 import pathlib
 
 import pytest
diff --git a/tests/acceptance/test_measurement_service.py b/tests/acceptance/test_measurement_service.py
index 578e043a9..4310556ab 100644
--- a/tests/acceptance/test_measurement_service.py
+++ b/tests/acceptance/test_measurement_service.py
@@ -1,4 +1,5 @@
 """Tests to validate measurement service. Uses the Sample Measurement Example."""
+
 import random
 import urllib.parse
 import urllib.request
diff --git a/tests/acceptance/test_streaming_data_measurement.py b/tests/acceptance/test_streaming_data_measurement.py
index 7187ac12e..6d1626299 100644
--- a/tests/acceptance/test_streaming_data_measurement.py
+++ b/tests/acceptance/test_streaming_data_measurement.py
@@ -1,4 +1,5 @@
 """Tests to validate a v2 measurement service that streams data."""
+
 from typing import Generator, List
 
 import grpc
diff --git a/tests/acceptance/test_yield_vs_return.py b/tests/acceptance/test_yield_vs_return.py
index 557649cb9..959b6028d 100644
--- a/tests/acceptance/test_yield_vs_return.py
+++ b/tests/acceptance/test_yield_vs_return.py
@@ -1,4 +1,5 @@
 """Tests to validate that yield and return are both supported in v2 measurements."""
+
 from typing import Generator
 
 import pytest
diff --git a/tests/conftest.py b/tests/conftest.py
index 71c071677..2161c114b 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,4 +1,5 @@
 """Pytest configuration file."""
+
 import pathlib
 import sys
 from typing import Generator, List
diff --git a/tests/integration/session_management/conftest.py b/tests/integration/session_management/conftest.py
index bf9d7b7d7..8b100f7b3 100644
--- a/tests/integration/session_management/conftest.py
+++ b/tests/integration/session_management/conftest.py
@@ -1,4 +1,5 @@
 """Pytest configuration file for integration tests."""
+
 import pathlib
 
 import pytest
diff --git a/tests/integration/test_service_manager.py b/tests/integration/test_service_manager.py
index c697f0ece..1e0d0559d 100644
--- a/tests/integration/test_service_manager.py
+++ b/tests/integration/test_service_manager.py
@@ -1,4 +1,5 @@
 """Contains test to validate service_manager.py."""
+
 from typing import cast
 
 import grpc
diff --git a/tests/unit/_drivers/_driver_utils.py b/tests/unit/_drivers/_driver_utils.py
index f7e36393f..20f894885 100644
--- a/tests/unit/_drivers/_driver_utils.py
+++ b/tests/unit/_drivers/_driver_utils.py
@@ -1,4 +1,5 @@
 """Driver-related unit test utilities."""
+
 from typing import List, Type, TypeVar
 from unittest.mock import Mock, create_autospec
 
diff --git a/tests/unit/_reservation_utils.py b/tests/unit/_reservation_utils.py
index 5a43efd06..cd06677d0 100644
--- a/tests/unit/_reservation_utils.py
+++ b/tests/unit/_reservation_utils.py
@@ -1,4 +1,5 @@
 """Reservation-related unit test utilities."""
+
 from typing import List
 
 from ni_measurementlink_service._internal.stubs import session_pb2
diff --git a/tests/unit/test_discovery_client.py b/tests/unit/test_discovery_client.py
index de148eb5b..e91b31043 100644
--- a/tests/unit/test_discovery_client.py
+++ b/tests/unit/test_discovery_client.py
@@ -1,5 +1,6 @@
 """Contains tests to validate the discovery_client.py.
 """
+
 import json
 import pathlib
 import subprocess
diff --git a/tests/unit/test_metadata.py b/tests/unit/test_metadata.py
index 94a800fcd..8323baff5 100644
--- a/tests/unit/test_metadata.py
+++ b/tests/unit/test_metadata.py
@@ -1,4 +1,5 @@
 """Contains tests to validate metadata.py."""
+
 from enum import Enum, IntEnum
 
 import pytest
diff --git a/tests/unit/test_serialization_strategy.py b/tests/unit/test_serialization_strategy.py
index c1873f726..7cc03c636 100644
--- a/tests/unit/test_serialization_strategy.py
+++ b/tests/unit/test_serialization_strategy.py
@@ -1,4 +1,5 @@
 """Contains tests to validate the serializationstrategy.py. """
+
 import pytest
 from google.protobuf import type_pb2
 
diff --git a/tests/unit/test_serializer.py b/tests/unit/test_serializer.py
index bf02a6805..d9014e838 100644
--- a/tests/unit/test_serializer.py
+++ b/tests/unit/test_serializer.py
@@ -1,4 +1,5 @@
 """Contains tests to validate serializer.py."""
+
 from enum import Enum, IntEnum
 from typing import Dict, Sequence
 
diff --git a/tests/unit/test_service.py b/tests/unit/test_service.py
index 0f2042bc4..a6bfe5124 100644
--- a/tests/unit/test_service.py
+++ b/tests/unit/test_service.py
@@ -1,4 +1,5 @@
 """Tests to validated user facing decorators in service.py."""
+
 import pathlib
 import typing
 from enum import Enum
diff --git a/tests/utilities/connection_subset.py b/tests/utilities/connection_subset.py
index ecfed4983..5bbe55f32 100644
--- a/tests/utilities/connection_subset.py
+++ b/tests/utilities/connection_subset.py
@@ -1,10 +1,8 @@
 """Utility to create and construct connection subset."""
+
 from typing import NamedTuple, TypeVar, Union
 
-from ni_measurementlink_service.session_management import (
-    Connection,
-    TypedConnection,
-)
+from ni_measurementlink_service.session_management import Connection, TypedConnection
 
 _T = TypeVar("_T")
 
diff --git a/tests/utilities/fake_discovery_service.py b/tests/utilities/fake_discovery_service.py
index d8f06d9c2..334f0d364 100644
--- a/tests/utilities/fake_discovery_service.py
+++ b/tests/utilities/fake_discovery_service.py
@@ -1,4 +1,5 @@
 """Contains Test Doubles related to Discovery service. """
+
 import uuid
 
 
diff --git a/tests/utilities/fake_driver.py b/tests/utilities/fake_driver.py
index b21e664e0..6a3af0d34 100644
--- a/tests/utilities/fake_driver.py
+++ b/tests/utilities/fake_driver.py
@@ -1,4 +1,5 @@
 """Fake driver API for testing."""
+
 from __future__ import annotations
 
 import sys
diff --git a/tests/utilities/measurements/loopback_measurement/__init__.py b/tests/utilities/measurements/loopback_measurement/__init__.py
index 3c41bf4a1..095856fcf 100644
--- a/tests/utilities/measurements/loopback_measurement/__init__.py
+++ b/tests/utilities/measurements/loopback_measurement/__init__.py
@@ -1,4 +1,5 @@
 """Contains utility functions to test loopback measurement service. """
+
 import pathlib
 from enum import Enum
 from typing import Iterable, Tuple
diff --git a/tests/utilities/measurements/nidaqmx_measurement/__init__.py b/tests/utilities/measurements/nidaqmx_measurement/__init__.py
index 224d8ed62..a45cdd5f3 100644
--- a/tests/utilities/measurements/nidaqmx_measurement/__init__.py
+++ b/tests/utilities/measurements/nidaqmx_measurement/__init__.py
@@ -1,4 +1,5 @@
 """NI-DAQmx MeasurementLink test service."""
+
 import pathlib
 from typing import List, Sequence, Tuple
 
@@ -7,7 +8,6 @@
 import ni_measurementlink_service as nims
 from ni_measurementlink_service.session_management import TypedSessionInformation
 
-
 service_directory = pathlib.Path(__file__).resolve().parent
 measurement_service = nims.MeasurementService(
     service_config_path=service_directory / "NIDAQmxMeasurement.serviceconfig",
diff --git a/tests/utilities/measurements/nidcpower_measurement/__init__.py b/tests/utilities/measurements/nidcpower_measurement/__init__.py
index be8157ee8..adc6fad00 100644
--- a/tests/utilities/measurements/nidcpower_measurement/__init__.py
+++ b/tests/utilities/measurements/nidcpower_measurement/__init__.py
@@ -1,4 +1,5 @@
 """NI-DCPower MeasurementLink test service."""
+
 import pathlib
 from contextlib import ExitStack
 from typing import Iterable, Sequence, Tuple
diff --git a/tests/utilities/measurements/nidigital_measurement/__init__.py b/tests/utilities/measurements/nidigital_measurement/__init__.py
index 0cb3c709b..bc610bde4 100644
--- a/tests/utilities/measurements/nidigital_measurement/__init__.py
+++ b/tests/utilities/measurements/nidigital_measurement/__init__.py
@@ -1,4 +1,5 @@
 """NI-Digital MeasurementLink test service."""
+
 import pathlib
 from itertools import groupby
 from typing import Iterable, Sequence, Tuple, Union
@@ -6,7 +7,10 @@
 import nidigital
 
 import ni_measurementlink_service as nims
-from ni_measurementlink_service.session_management import TypedConnection, TypedSessionInformation
+from ni_measurementlink_service.session_management import (
+    TypedConnection,
+    TypedSessionInformation,
+)
 
 service_directory = pathlib.Path(__file__).resolve().parent
 measurement_service = nims.MeasurementService(
diff --git a/tests/utilities/measurements/nidmm_measurement/__init__.py b/tests/utilities/measurements/nidmm_measurement/__init__.py
index 7370b8401..9f581cafa 100644
--- a/tests/utilities/measurements/nidmm_measurement/__init__.py
+++ b/tests/utilities/measurements/nidmm_measurement/__init__.py
@@ -1,4 +1,5 @@
 """NI-DMM MeasurementLink test service."""
+
 import math
 import pathlib
 from typing import List, Sequence, Tuple
@@ -8,7 +9,6 @@
 import ni_measurementlink_service as nims
 from ni_measurementlink_service.session_management import TypedSessionInformation
 
-
 service_directory = pathlib.Path(__file__).resolve().parent
 measurement_service = nims.MeasurementService(
     service_config_path=service_directory / "NIDmmMeasurement.serviceconfig",
diff --git a/tests/utilities/measurements/nifgen_measurement/__init__.py b/tests/utilities/measurements/nifgen_measurement/__init__.py
index 41f3e344a..6e1f6864d 100644
--- a/tests/utilities/measurements/nifgen_measurement/__init__.py
+++ b/tests/utilities/measurements/nifgen_measurement/__init__.py
@@ -1,4 +1,5 @@
 """NI-FGEN MeasurementLink test service."""
+
 import pathlib
 from contextlib import ExitStack
 from typing import Iterable, Sequence, Tuple
diff --git a/tests/utilities/measurements/niscope_measurement/__init__.py b/tests/utilities/measurements/niscope_measurement/__init__.py
index 75f7c31d0..df0c3e2a2 100644
--- a/tests/utilities/measurements/niscope_measurement/__init__.py
+++ b/tests/utilities/measurements/niscope_measurement/__init__.py
@@ -1,4 +1,5 @@
 """NI-SCOPE MeasurementLink test service."""
+
 import pathlib
 from contextlib import ExitStack
 from typing import Iterable, List, Sequence, Tuple
diff --git a/tests/utilities/measurements/niswitch_measurement/__init__.py b/tests/utilities/measurements/niswitch_measurement/__init__.py
index f31e8d68e..0041f41e4 100644
--- a/tests/utilities/measurements/niswitch_measurement/__init__.py
+++ b/tests/utilities/measurements/niswitch_measurement/__init__.py
@@ -1,4 +1,5 @@
 """NI-SWITCH MeasurementLink test service."""
+
 import pathlib
 from typing import Iterable, Sequence, Tuple
 
diff --git a/tests/utilities/measurements/pin_aware_measurement/__init__.py b/tests/utilities/measurements/pin_aware_measurement/__init__.py
index 5a85207b3..4058fccc0 100644
--- a/tests/utilities/measurements/pin_aware_measurement/__init__.py
+++ b/tests/utilities/measurements/pin_aware_measurement/__init__.py
@@ -1,4 +1,5 @@
 """Pin-aware MeasurementLink test service."""
+
 import pathlib
 from typing import Iterable, Tuple
 
diff --git a/tests/utilities/measurements/streaming_data_measurement/__init__.py b/tests/utilities/measurements/streaming_data_measurement/__init__.py
index 90aac1e07..939180d09 100644
--- a/tests/utilities/measurements/streaming_data_measurement/__init__.py
+++ b/tests/utilities/measurements/streaming_data_measurement/__init__.py
@@ -1,4 +1,5 @@
 """Contains utility functions to test a v2 measurement service that streams data."""
+
 import pathlib
 import threading
 import time
diff --git a/tests/utilities/measurements/unknown_interface_measurement/__init__.py b/tests/utilities/measurements/unknown_interface_measurement/__init__.py
index 7da031b0d..84897cb15 100644
--- a/tests/utilities/measurements/unknown_interface_measurement/__init__.py
+++ b/tests/utilities/measurements/unknown_interface_measurement/__init__.py
@@ -1,4 +1,5 @@
 """Contains utility functions to test loopback measurement service. """
+
 import pathlib
 
 import ni_measurementlink_service as nims
diff --git a/tests/utilities/measurements/v1_only_measurement/__init__.py b/tests/utilities/measurements/v1_only_measurement/__init__.py
index ce9041bf0..8330e4c4d 100644
--- a/tests/utilities/measurements/v1_only_measurement/__init__.py
+++ b/tests/utilities/measurements/v1_only_measurement/__init__.py
@@ -1,4 +1,5 @@
 """Contains utility functions to test loopback measurement service. """
+
 import pathlib
 
 import ni_measurementlink_service as nims
diff --git a/tests/utilities/measurements/v2_only_measurement/__init__.py b/tests/utilities/measurements/v2_only_measurement/__init__.py
index 8b739813b..45dece2f9 100644
--- a/tests/utilities/measurements/v2_only_measurement/__init__.py
+++ b/tests/utilities/measurements/v2_only_measurement/__init__.py
@@ -1,4 +1,5 @@
 """Contains utility functions to test loopback measurement service. """
+
 import pathlib
 
 import ni_measurementlink_service as nims
diff --git a/tests/utilities/measurements/yield_vs_return_measurement/__init__.py b/tests/utilities/measurements/yield_vs_return_measurement/__init__.py
index e277e7629..421ea3075 100644
--- a/tests/utilities/measurements/yield_vs_return_measurement/__init__.py
+++ b/tests/utilities/measurements/yield_vs_return_measurement/__init__.py
@@ -1,4 +1,5 @@
 """Contains utility functions to test that yield and return are supported in measurements."""
+
 import pathlib
 import random
 import threading
diff --git a/tests/utilities/pin_map_client.py b/tests/utilities/pin_map_client.py
index 041c05380..7c3cffabd 100644
--- a/tests/utilities/pin_map_client.py
+++ b/tests/utilities/pin_map_client.py
@@ -1,4 +1,5 @@
 """Client for accessing the MeasurementLink pin map service."""
+
 import logging
 import pathlib
 import threading