Skip to content

Commit c9bb5a5

Browse files
authored
Merge branch 'main' into support_python312
2 parents 9f56b5d + 4593208 commit c9bb5a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+504
-467
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,12 @@ repos:
2929
- id: check-ast
3030
- repo: https://github.com/astral-sh/ruff-pre-commit
3131
# Ruff version (Used for linting)
32-
rev: v0.1.0
32+
rev: v0.1.8
3333
hooks:
3434
- id: ruff
35-
args: [ --fix, --exit-non-zero-on-fix ]
36-
- repo: https://github.com/ambv/black
37-
rev: 23.10.0
38-
hooks:
39-
- id: black
40-
args: [--skip-string-normalization]
35+
args: [ --fix, --exit-non-zero-on-fix, --preview ]
36+
- id: ruff-format
37+
args: [ --preview ]
4138
- repo: https://github.com/pre-commit/mirrors-mypy
4239
rev: v1.6.1
4340
hooks:

mkdocs/docs/feature-support.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ The goal is that the python library will provide a functional, performant subset
3636
| Create Table | X | X |
3737
| Rename Table | X | X |
3838
| Drop Table | X | X |
39-
| Alter Table | X | |
40-
| Set Table Properties | X | |
39+
| Alter Table | X | X |
40+
| Set Table Properties | X | X |
4141
| Create Namespace | X | X |
4242
| Drop Namespace | X | X |
4343
| Set Namespace Properties | X | X |

mkdocs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
mkdocs==1.5.3
1919
griffe==0.38.1
20-
jinja2==3.1.2
20+
jinja2==3.1.3
2121
mkdocstrings==0.24.0
22-
mkdocstrings-python==1.7.5
22+
mkdocstrings-python==1.8.0
2323
mkdocs-literate-nav==0.6.1
2424
mkdocs-autorefs==0.5.0
2525
mkdocs-gen-files==0.5.0

poetry.lock

Lines changed: 96 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyiceberg/avro/codecs/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
so don't confuse it with the Python's "codecs", which is a package mainly for
2424
converting character sets (https://docs.python.org/3/library/codecs.html).
2525
"""
26+
2627
from __future__ import annotations
2728

2829
from typing import Dict, Optional, Type

pyiceberg/avro/codecs/codec.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ class Codec(ABC):
2424

2525
@staticmethod
2626
@abstractmethod
27-
def compress(data: bytes) -> tuple[bytes, int]:
28-
...
27+
def compress(data: bytes) -> tuple[bytes, int]: ...
2928

3029
@staticmethod
3130
@abstractmethod
32-
def decompress(data: bytes) -> bytes:
33-
...
31+
def decompress(data: bytes) -> bytes: ...

pyiceberg/avro/file.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# under the License.
1717
# pylint: disable=W0621
1818
"""Avro reader for reading Avro files."""
19+
1920
from __future__ import annotations
2021

2122
import io

pyiceberg/avro/reader.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
The reader tree can be changed in such a way that the
2424
read schema is different, while respecting the read schema.
2525
"""
26+
2627
from __future__ import annotations
2728

2829
from abc import abstractmethod
@@ -85,12 +86,10 @@ def _skip_map_array(decoder: BinaryDecoder, skip_entry: Callable[[], None]) -> N
8586

8687
class Reader(Singleton):
8788
@abstractmethod
88-
def read(self, decoder: BinaryDecoder) -> Any:
89-
...
89+
def read(self, decoder: BinaryDecoder) -> Any: ...
9090

9191
@abstractmethod
92-
def skip(self, decoder: BinaryDecoder) -> None:
93-
...
92+
def skip(self, decoder: BinaryDecoder) -> None: ...
9493

9594
def __repr__(self) -> str:
9695
"""Return the string representation of the Reader class."""

pyiceberg/avro/resolver.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,7 @@ def resolve_reader(
232232
Raises:
233233
NotImplementedError: If attempting to resolve an unrecognized object type.
234234
"""
235-
return visit_with_partner(
236-
file_schema, read_schema, ReadSchemaResolver(read_types, read_enums), SchemaPartnerAccessor()
237-
) # type: ignore
235+
return visit_with_partner(file_schema, read_schema, ReadSchemaResolver(read_types, read_enums), SchemaPartnerAccessor()) # type: ignore
238236

239237

240238
class EnumReader(Reader):

pyiceberg/avro/writer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
Constructing a writer tree from the schema makes it easy
2121
to decouple the writing implementation from the schema.
2222
"""
23+
2324
from __future__ import annotations
2425

2526
from abc import abstractmethod
@@ -43,8 +44,7 @@
4344
@dataclass(frozen=True)
4445
class Writer(Singleton):
4546
@abstractmethod
46-
def write(self, encoder: BinaryEncoder, val: Any) -> Any:
47-
...
47+
def write(self, encoder: BinaryEncoder, val: Any) -> Any: ...
4848

4949
def __repr__(self) -> str:
5050
"""Return string representation of this object."""

0 commit comments

Comments
 (0)