Skip to content

Commit 81e4046

Browse files
authored
MINOR: [Python] Remove impossible TODO in server middleware (#48794)
### Rationale for this change Remove a TODO comment that has been impossible to implement. The TODO asked to "prevent duplicate keys" in `_ServerMiddlewareFactoryWrapper.start_call()`, but this is already guaranteed by Python dict semantics. The TODO was added in commit d1848c8. ### What changes are included in this PR? Remove the TODO comment from `python/pyarrow/_flight.pyx`. The `factories` attribute has always been typed as `dict` (both in Cython `cdef` and the `__init__` type hint), which inherently prevents duplicate keys. ### Are these changes tested? I did not test. ### Are there any user-facing changes? No. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: David Li <li.davidm96@gmail.com>
1 parent ba2ccae commit 81e4046

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

python/pyarrow/_flight.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2836,7 +2836,6 @@ cdef class _ServerMiddlewareFactoryWrapper(ServerMiddlewareFactory):
28362836
for key, factory in self.factories.items():
28372837
instance = factory.start_call(info, headers)
28382838
if instance:
2839-
# TODO: prevent duplicate keys
28402839
instances[key] = instance
28412840
if instances:
28422841
wrapper = _ServerMiddlewareWrapper(instances)

0 commit comments

Comments
 (0)