Skip to content

Commit

Permalink
fix: add back original warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wjones127 committed Aug 3, 2022
1 parent 197386c commit 99632b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 42 deletions.
14 changes: 7 additions & 7 deletions python/deltalake/deltalake.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class ArrayType:
def from_json(json: str) -> "ArrayType": ...
def to_pyarrow(
self,
) -> pa.DataType: ...
) -> pa.ListType: ...
@staticmethod
def from_pyarrow(type: pa.DataType) -> "ArrayType": ...
def from_pyarrow(type: pa.ListType) -> "ArrayType": ...

class MapType:
def __init__(
Expand All @@ -60,10 +60,10 @@ class MapType:

def to_json(self) -> str: ...
@staticmethod
def from_json(json: str) -> "ArrayType": ...
def to_pyarrow(self) -> pa.DataType: ...
def from_json(json: str) -> "MapType": ...
def to_pyarrow(self) -> pa.MapType: ...
@staticmethod
def from_pyarrow(type: pa.DataType) -> "ArrayType": ...
def from_pyarrow(type: pa.MapType) -> "MapType": ...

class Field:
def __init__(
Expand Down Expand Up @@ -94,9 +94,9 @@ class StructType:
def to_json(self) -> str: ...
@staticmethod
def from_json(json: str) -> "StructType": ...
def to_pyarrow(self) -> pa.DataType: ...
def to_pyarrow(self) -> pa.StructType: ...
@staticmethod
def from_pyarrow(type: pa.DataType) -> "StructType": ...
def from_pyarrow(type: pa.StructType) -> "StructType": ...

class Schema:
def __init__(self, fields: List[Field]) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion python/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// #![deny(warnings)]
#![deny(warnings)]

extern crate pyo3;

Expand Down
34 changes: 0 additions & 34 deletions python/tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,40 +60,6 @@ def test_table_schema_pyarrow_020():
assert field.metadata is None


# def test_schema_pyarrow_from_decimal_and_floating_types():
# field_name = "decimal_test"
# metadata = {b"metadata_k": b"metadata_v"}
# precision = 20
# scale = 2
# pyarrow_field = pyarrow_field_from_dict(
# {
# "name": field_name,
# "nullable": False,
# "metadata": metadata,
# "type": {"name": "decimal", "precision": precision, "scale": scale},
# }
# )
# assert pyarrow_field.name == field_name
# assert pyarrow_field.type == pyarrow.decimal128(precision=precision, scale=scale)
# assert dict(pyarrow_field.metadata) == metadata
# assert pyarrow_field.nullable is False

# field_name = "floating_test"
# metadata = {b"metadata_k": b"metadata_v"}
# pyarrow_field = pyarrow_field_from_dict(
# {
# "name": field_name,
# "nullable": False,
# "metadata": metadata,
# "type": {"name": "floatingpoint", "precision": "HALF"},
# }
# )
# assert pyarrow_field.name == field_name
# assert pyarrow_field.type == pyarrow.float16()
# assert dict(pyarrow_field.metadata) == metadata
# assert pyarrow_field.nullable is False


def test_primitive_delta_types():
valid_types = [
"string",
Expand Down

0 comments on commit 99632b0

Please sign in to comment.