Skip to content

Commit 5980d1e

Browse files
committed
fmt
1 parent 15923e0 commit 5980d1e

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

cloudquery/sdk/schema/column.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,24 @@ def __init__(
2323
self.not_null = not_null
2424
self.incremental_key = incremental_key
2525
self.unique = unique
26-
26+
2727
def __str__(self) -> str:
2828
return f"Column(name={self.name}, type={self.type}, description={self.description}, primary_key={self.primary_key}, not_null={self.not_null}, incremental_key={self.incremental_key}, unique={self.unique})"
29-
29+
3030
def __repr__(self) -> str:
3131
return f"Column(name={self.name}, type={self.type}, description={self.description}, primary_key={self.primary_key}, not_null={self.not_null}, incremental_key={self.incremental_key}, unique={self.unique})"
32-
32+
3333
def __eq__(self, __value: object) -> bool:
3434
if type(__value) == Column:
35-
return (self.name == __value.name
36-
and self.type == __value.type
37-
and self.description == __value.description
38-
and self.primary_key == __value.primary_key
39-
and self.not_null == __value.not_null
40-
and self.incremental_key == __value.incremental_key
41-
and self.unique == __value.unique)
35+
return (
36+
self.name == __value.name
37+
and self.type == __value.type
38+
and self.description == __value.description
39+
and self.primary_key == __value.primary_key
40+
and self.not_null == __value.not_null
41+
and self.incremental_key == __value.incremental_key
42+
and self.unique == __value.unique
43+
)
4244
return False
4345

4446
def to_arrow_field(self):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
from .transformers import transform_list_of_dict
2-
from .openapi import oapi_definition_to_columns
2+
from .openapi import oapi_definition_to_columns

tests/transformers/openapi.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"array": {
3838
"type": "array",
39-
"items": {"$ref": "#/definitions/SomeDefinition"},
39+
"items": {"$ref": "#/definitions/SomeDefinition"},
4040
},
4141
},
4242
},
@@ -46,12 +46,12 @@
4646

4747
def test_oapi_properties_to_columns():
4848
expected_columns = [
49-
Column("string", pa.string() , description=None),
50-
Column("number", pa.int64() , description=None),
51-
Column("integer", pa.int64() , description=None),
52-
Column("boolean", pa.bool_() , description=None),
53-
Column("object", JSONType() , description=None),
54-
Column("array", JSONType() , description=None),
49+
Column("string", pa.string(), description=None),
50+
Column("number", pa.int64(), description=None),
51+
Column("integer", pa.int64(), description=None),
52+
Column("boolean", pa.bool_(), description=None),
53+
Column("object", JSONType(), description=None),
54+
Column("array", JSONType(), description=None),
5555
]
5656
columns = oapi_definition_to_columns(OAPI_SPEC["definitions"]["TestDefinition"])
5757
assert expected_columns == columns

0 commit comments

Comments
 (0)