Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix D403 pydocstyle issues #7801

Merged
merged 1 commit into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ repos:
- id: pydocstyle
args:
[
"--ignore=D100,D102,D101,D103,D104,D105,D106,D107,D200,D202,D203,D205,D209,D212,D213,D400,D401,D403,D404,D405,D406,D407,D411,D413,D414,D415,D417",
"--ignore=D100,D102,D101,D103,D104,D105,D106,D107,D200,D202,D203,D205,D209,D212,D213,D400,D401,D404,D405,D406,D407,D411,D413,D414,D415,D417",
]
additional_dependencies:
- tomli==2.0.1
12 changes: 6 additions & 6 deletions python/pyiceberg/avro/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class BinaryDecoder:

def __init__(self, input_stream: InputStream) -> None:
"""
reader is a Python object on which we can call read, seek, and tell.
Reader is a Python object on which we can call read, seek, and tell.
"""
self._input_stream = input_stream

Expand Down Expand Up @@ -71,7 +71,7 @@ def skip(self, n: int) -> None:

def read_boolean(self) -> bool:
"""
a boolean is written as a single byte
A boolean is written as a single byte
whose value is either 0 (false) or 1 (true).
"""
return ord(self.read(1)) == 1
Expand Down Expand Up @@ -141,29 +141,29 @@ def read_uuid_from_fixed(self) -> UUID:

def read_time_millis(self) -> time:
"""
int is decoded as python time object which represents
Int is decoded as python time object which represents
the number of milliseconds after midnight, 00:00:00.000.
"""
millis = self.read_int()
return micros_to_time(millis * 1000)

def read_time_micros(self) -> time:
"""
long is decoded as python time object which represents
Long is decoded as python time object which represents
the number of microseconds after midnight, 00:00:00.000000.
"""
return micros_to_time(self.read_int())

def read_timestamp_micros(self) -> datetime:
"""
long is decoded as python datetime object which represents
Long is decoded as python datetime object which represents
the number of microseconds from the unix epoch, 1 January 1970.
"""
return micros_to_timestamp(self.read_int())

def read_timestamptz_micros(self) -> datetime:
"""
long is decoded as python datetime object which represents
Long is decoded as python datetime object which represents
the number of microseconds from the unix epoch, 1 January 1970.

Adjusted to UTC
Expand Down
10 changes: 5 additions & 5 deletions python/pyiceberg/io/pyarrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,23 +578,23 @@ def after_field(self, field: pa.Field) -> None:

@abstractmethod
def schema(self, schema: pa.Schema, field_results: List[Optional[T]]) -> Optional[T]:
"""visit a schema"""
"""Visit a schema"""

@abstractmethod
def struct(self, struct: pa.StructType, field_results: List[Optional[T]]) -> Optional[T]:
"""visit a struct"""
"""Visit a struct"""

@abstractmethod
def list(self, list_type: pa.ListType, element_result: Optional[T]) -> Optional[T]:
"""visit a list"""
"""Visit a list"""

@abstractmethod
def map(self, map_type: pa.MapType, key_result: Optional[T], value_result: Optional[T]) -> Optional[T]:
"""visit a map"""
"""Visit a map"""

@abstractmethod
def primitive(self, primitive: pa.DataType) -> Optional[T]:
"""visit a primitive type"""
"""Visit a primitive type"""


def _get_field_id(field: pa.Field) -> Optional[int]:
Expand Down
2 changes: 1 addition & 1 deletion python/pyiceberg/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def preserves_order(self) -> bool:
return True

def satisfies_order_of(self, other: Transform[S, T]) -> bool:
"""ordering by value is the same as long as the other preserves order"""
"""Ordering by value is the same as long as the other preserves order"""
return other.preserves_order

def to_human_string(self, source_type: IcebergType, value: Optional[S]) -> str:
Expand Down
2 changes: 1 addition & 1 deletion python/pyiceberg/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


def merge_config(lhs: RecursiveDict, rhs: RecursiveDict) -> RecursiveDict:
"""merges right-hand side into the left-hand side"""
"""Merges right-hand side into the left-hand side"""
new_config = lhs.copy()
for rhs_key, rhs_value in rhs.items():
if rhs_key in new_config:
Expand Down