pitrou commented on code in PR #40976:
URL: https://github.com/apache/arrow/pull/40976#discussion_r1552018709
##########
python/pyarrow/_dataset_parquet.pyx:
##########
@@ -198,6 +198,10 @@ cdef class ParquetFileFormat(FileFormat):
-------
pyarrow.dataset.FileWriteOptions
"""
+ # Safeguard from calling make_write_options as a static class method
+ if not isinstance(self, ParquetFileFormat):
+ raise TypeError("pyarrow.dataset.ParquetFileFormat() must be
initiated"
+ " before calling make_write_options()")
Review Comment:
"Initiated" does not make sense here. Perhaps:
```suggestion
raise TypeError("make_write_options() should be called on "
"an instance of ParquetFileFormat")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]