lidavidm commented on code in PR #43537:
URL: https://github.com/apache/arrow/pull/43537#discussion_r1764905726
##########
python/pyarrow/_flight.pyx:
##########
@@ -736,16 +742,48 @@ cdef class FlightEndpoint(_Weakrefable):
CLocation.Parse(tobytes(location)).Value(&c_location))
self.endpoint.locations.push_back(c_location)
+ if expiration_time is not None:
+ self.endpoint.expiration_time =
TimePoint_to_system_time(TimePoint_from_ns(
+ expiration_time.cast(timestamp("ns")).value))
+
+ self.endpoint.app_metadata = tobytes(app_metadata)
Review Comment:
Maybe we can write `str, default ""` instead? To me `str, optional` is a
little ambiguous in this case: I would have taken it to mean that `None` is
allowed. I don't see a clear spec for this in numpydoc but I did find this
Pandas docstring guide (albeit from 2018) with a similar assumption
https://python-sprints.github.io/pandas/guide/pandas_docstring.html#section-3-parameters
> In cases where the default value is None, meaning that the value will not
be used. Instead of “str, default None”, it is preferred to write “str,
optional”.
--
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]