Skip to content

Commit 5ef015d

Browse files
author
Alex J Lennon
committed
Fix ruff deprecation warning and remaining lint issue
1 parent 77b7373 commit 5ef015d

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

lab_testing/tools/device_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def list_devices() -> Dict[str, Any]:
7272
}
7373

7474

75-
def test_device(device_id_or_name: str) -> Dict[str, Any]: # noqa: PT
75+
def test_device(device_id_or_name: str) -> Dict[str, Any]:
7676
"""
7777
Test connectivity to a specific device.
7878

lab_testing/tools/network_mapper.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ def create_network_map(
158158
# Test devices in parallel
159159
with concurrent.futures.ThreadPoolExecutor(max_workers=10) as executor:
160160
futures = {
161-
executor.submit(test_device, device_id): device_id
162-
for device_id in devices
161+
executor.submit(test_device, device_id): device_id for device_id in devices
163162
}
164163

165164
for future in concurrent.futures.as_completed(futures):

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ target-version = ['py38']
5656
[tool.ruff]
5757
line-length = 100
5858
target-version = "py38"
59+
60+
[tool.ruff.lint]
5961
select = ["E", "F", "W", "I", "N", "UP", "B", "C4", "DTZ", "T10", "EM", "ISC", "ICN", "PIE", "T20", "PYI", "PT", "Q", "RSE", "RET", "SIM", "ARG", "PTH", "ERA", "PD", "PGH", "PL", "TRY", "NPY", "RUF"]
6062
ignore = [
6163
"E501", # Line too long (handled by black)

0 commit comments

Comments
 (0)