Skip to content

Commit e973bf9

Browse files
style: bump black to mitigate GHSA-4xh5-x5gv-qwph vuln and autoformatting
1 parent 6713a7e commit e973bf9

File tree

18 files changed

+35
-80
lines changed

18 files changed

+35
-80
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ xlsx2csv = "0.8.2"
7070
optional = true
7171

7272
[tool.poetry.group.lint.dependencies]
73-
black = "22.6.0"
73+
black = "24.3.0"
7474
astroid = "2.14.2"
7575
isort = "5.11.5"
7676
pylint = "2.16.4"

src/dve/core_engine/backends/base/auditing.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@
1212
from multiprocessing import Queue as ProcessQueue
1313
from queue import Queue as ThreadQueue
1414
from types import TracebackType
15-
from typing import (
16-
Any,
17-
ClassVar,
18-
Generic,
19-
Optional,
20-
TypeVar,
21-
Union,
22-
)
15+
from typing import Any, ClassVar, Generic, Optional, TypeVar, Union
2316

2417
from pydantic import ValidationError, validate_arguments
2518
from typing_extensions import Literal, get_origin

src/dve/core_engine/backends/base/contract.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ def __call__( # pylint: disable=bad-staticmethod-argument
5656
resource: URI,
5757
entity_name: EntityName,
5858
schema: type[BaseModel],
59-
) -> T:
60-
...
59+
) -> T: ...
6160

6261

6362
def reader_override(reader_type: type[BaseFileReader]) -> WrapDecorator:

src/dve/core_engine/backends/base/reader.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ def __call__( # pylint: disable=bad-staticmethod-argument
3131
resource: URI,
3232
entity_name: EntityName,
3333
schema: type[BaseModel],
34-
) -> ET_co:
35-
...
34+
) -> ET_co: ...
3635

3736

3837
def read_function(entity_type: T) -> WrapDecorator:

src/dve/core_engine/backends/base/reference_data.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@
22

33
from abc import ABC, abstractmethod
44
from collections.abc import Callable, Iterator, Mapping
5-
from typing import (
6-
ClassVar,
7-
Generic,
8-
Optional,
9-
Union,
10-
get_type_hints,
11-
)
5+
from typing import ClassVar, Generic, Optional, Union, get_type_hints
126

137
from pydantic import BaseModel, Field
148
from typing_extensions import Annotated, Literal

src/dve/core_engine/backends/base/rules.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,7 @@
44
from abc import ABC, abstractmethod
55
from collections import defaultdict
66
from collections.abc import Iterable
7-
from typing import (
8-
Any,
9-
ClassVar,
10-
Generic,
11-
NoReturn,
12-
Optional,
13-
TypeVar,
14-
)
7+
from typing import Any, ClassVar, Generic, NoReturn, Optional, TypeVar
158
from uuid import uuid4
169

1710
from typing_extensions import Literal, Protocol, get_type_hints
@@ -66,8 +59,7 @@ def __call__( # pylint: disable=bad-staticmethod-argument
6659
entities: Entities,
6760
*,
6861
config: T_contra,
69-
) -> Messages:
70-
...
62+
) -> Messages: ...
7163

7264

7365
class BaseStepImplementations(Generic[EntityType], ABC): # pylint: disable=too-many-public-methods

src/dve/core_engine/backends/implementations/duckdb/contract.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,11 @@ def apply_data_contract(
135135
all_messages.extend(application_helper.errors)
136136

137137
casting_statements = [
138-
self.generate_ddb_cast_statement(column, dtype)
139-
if column in relation.columns
140-
else self.generate_ddb_cast_statement(column, dtype, null_flag=True)
138+
(
139+
self.generate_ddb_cast_statement(column, dtype)
140+
if column in relation.columns
141+
else self.generate_ddb_cast_statement(column, dtype, null_flag=True)
142+
)
141143
for column, dtype in ddb_schema.items()
142144
]
143145
try:

src/dve/core_engine/backends/implementations/spark/auditing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Auditing definitions for spark backend"""
2+
23
import operator
34
from collections.abc import Iterable
45
from functools import reduce

src/dve/core_engine/backends/implementations/spark/spark_helpers.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@
1212
from dataclasses import dataclass, is_dataclass
1313
from decimal import Decimal
1414
from functools import wraps
15-
from typing import (
16-
Any,
17-
ClassVar,
18-
Optional,
19-
TypeVar,
20-
Union,
21-
overload,
22-
)
15+
from typing import Any, ClassVar, Optional, TypeVar, Union, overload
2316

2417
from delta.exceptions import ConcurrentAppendException, DeltaConcurrentModificationException
2518
from pydantic import BaseModel

src/dve/core_engine/backends/metadata/rules.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@
33
import warnings
44
from abc import ABCMeta, abstractmethod
55
from collections.abc import Iterator, Sequence
6-
from typing import (
7-
Any,
8-
ClassVar,
9-
Optional,
10-
TypeVar,
11-
Union,
12-
)
6+
from typing import Any, ClassVar, Optional, TypeVar, Union
137

148
from pydantic import BaseModel, Extra, Field, root_validator, validate_arguments, validator
159
from typing_extensions import Literal

0 commit comments

Comments
 (0)