Skip to content

Commit ef48a69

Browse files
kvzclaude
andcommitted
Drop the dead source-method assert from request_method_plan
Method-override interpretation is keyed by operationId, and the contract derives each override's sourceMethod from that same operation (tusClientMethodOverrideModels), so after an operationId match the source_method comparison could never fire for contract-consistent callers — both generated call sites pass the UPLOAD_CHUNK constants derived from the very operation the override names. This converges the Python interpretation with the TypeScript runtime (tusMethodOverrideForOperation over the sourceMethod-less tusClientRuntimeMethodOverrideModels). source_method stays the no-override fallback method, mirroring the TS plan-method fallback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent bc5da81 commit ef48a69

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

tusclient/protocol_generated.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -439,15 +439,6 @@ def request_method_plan(operation_id, source_method, input_options=None):
439439
if not input_options.get(option_name, False):
440440
continue
441441

442-
if source_method != method_override['sourceMethod']:
443-
raise ValueError(
444-
'tus: method override expected {} for {}, got {}'.format(
445-
method_override['sourceMethod'],
446-
operation_id,
447-
source_method,
448-
)
449-
)
450-
451442
return {
452443
'headers': {
453444
method_override['headerName']: method_override['headerValue'],

0 commit comments

Comments
 (0)