Skip to content

Commit 2d1f90b

Browse files
author
Aigars Mahinovs
committed
Update black version and reformat
1 parent dbaa131 commit 2d1f90b

16 files changed

Lines changed: 21 additions & 12 deletions

dlt/core/__init__.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright (C) 2017. BMW Car IT GmbH. All rights reserved.
22
"""Basic ctypes binding to the DLT library"""
3+
34
import ctypes
45
import os
56

67
from dlt.core.core_base import * # noqa: F403
78

8-
99
API_VER = None
1010

1111

@@ -35,7 +35,7 @@ def get_api_specific_file(version):
3535

3636
# Fallback logic: Try to find the closest core_*.py
3737
for i in range(len(version_tuple)):
38-
truncated_tuple = version_tuple[:-(i+1)] + [0] * (i+1)
38+
truncated_tuple = version_tuple[: -(i + 1)] + [0] * (i + 1)
3939
name = "core_{}.py".format("".join((str(num) for num in truncated_tuple)))
4040
if os.path.exists(os.path.join(base_dir, name)):
4141
return name
@@ -55,10 +55,8 @@ def check_libdlt_version(api_ver):
5555
"""
5656
ver_info = tuple(int(num) for num in api_ver.split("."))
5757
if ver_info < (2, 18, 5):
58-
raise ImportError(
59-
"python-dlt only supports libdlt \
60-
v2.18.5 (33fbad18c814e13bd7ba2053525d8959fee437d1) or above"
61-
)
58+
raise ImportError("python-dlt only supports libdlt \
59+
v2.18.5 (33fbad18c814e13bd7ba2053525d8959fee437d1) or above")
6260

6361

6462
API_VER = get_version(dltlib) # noqa: F405

dlt/core/core_2188.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Copyright (C) 2022. BMW CTW PT. All rights reserved.
22
"""v2.18.8 specific class definitions"""
3+
34
import ctypes
45
import logging
56

dlt/core/core_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Copyright (C) 2016. BMW Car IT GmbH. All rights reserved.
22
"""Default implementation of the ctypes bindings for the DLT library"""
3+
34
import ctypes
45
import logging
56
import sys

dlt/dlt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Copyright (C) 2015. BMW Car IT GmbH. All rights reserved.
22
"""Pure Python implementation of DLT library"""
3+
34
import ctypes
45
import ipaddress as ip
56
import logging

dlt/dlt_broker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"""DLT Broker is running in a loop in a separate thread until stop_flag is set and adding received messages
33
to all registered queues
44
"""
5+
56
from contextlib import contextmanager
67
import ipaddress as ip
78
import logging

dlt/dlt_broker_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"""Handlers are classes that assist dlt_broker in receiving and
33
filtering DLT messages
44
"""
5+
56
from abc import ABC, abstractmethod
67
from collections import defaultdict
78
import ctypes
@@ -23,7 +24,6 @@
2324
py_dlt_file_main_loop,
2425
)
2526

26-
2727
DLT_CLIENT_TIMEOUT = 5
2828
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
2929

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ dependencies = [
2121

2222
[project.optional-dependencies]
2323
dev = [
24-
"black>=22.10",
25-
"flake8>=5",
26-
"pytest>=7.2.0",
27-
"pytest-cov>=4.0.0"
24+
"black>=26.3.1",
25+
"flake8>=8",
26+
"pytest>=9",
27+
"pytest-cov>=7"
2828
]
2929

3030
[project.urls]

tests/dlt_broker_from_file_spinner_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Copyright (C) 2023. BMW Car IT GmbH. All rights reserved.
22
"""Test DLTBroker with message handler DLTFileSpinner"""
3+
34
import os
45
import pytest
56
import tempfile

tests/dlt_broker_time_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Copyright (C) 2021. BMW Car IT GmbH. All rights reserved.
22
"""Test DLTBroker with enabling dlt_time"""
3+
34
from contextlib import contextmanager
45
from multiprocessing import Queue
56
import queue as tqueue

tests/dlt_core_unit_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Copyright (C) 2017. BMW Car IT GmbH. All rights reserved.
22
"""Basic size tests for ctype wrapper definitions, to protect against regressions"""
3+
34
import ctypes
45
import importlib
56
import os

0 commit comments

Comments
 (0)