Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Ramos Carreño <carlosramosca@hotmail.com>
  • Loading branch information
trossi and vnmabus authored Oct 2, 2024
1 parent 957887c commit c3fe17c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions rdata/conversion/to_r.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@


def convert_pd_array_to_np_array(
pd_array: Any, # noqa: ANN401
pd_array: pd.api.extensions.ExtensionArray,
) -> npt.NDArray[Any]:
"""
Convert pandas array object to numpy array.
Expand Down Expand Up @@ -527,10 +527,14 @@ def convert_to_r_object(self, # noqa: C901, PLR0912, PLR0915
else:
r_attributes = None

return build_r_object(r_type, value=r_value,
is_object=is_object,
attributes=r_attributes,
tag=tag, gp=gp)
return build_r_object(
r_type,
value=r_value,
is_object=is_object,
attributes=r_attributes,
tag=tag,
gp=gp,
)


def convert_python_to_r_data(
Expand Down
2 changes: 1 addition & 1 deletion rdata/tests/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def test_convert_to_r(fname: str, expand_altrep: bool) -> None: # noqa: FBT001
assert str(r_data) == str(new_r_data)
assert r_data == new_r_data

# Check futher that the resulting unparsed data is correct to ensure that
# Check further that the resulting unparsed data is correct to ensure that
# Python-to-R conversion hasn't created any odd objects that can't be unparsed
if not expand_altrep:
file_type, file_format = parse_file_type_and_format(data)
Expand Down

0 comments on commit c3fe17c

Please sign in to comment.