@@ -25,28 +25,36 @@ This is a top-level file that gets imported by the CythonClients.pyx file. That
2525file exposes Python wrappers of the services client to the end user.
2626
2727} }
28+ { {#let partial client_base |service|} }
29+ { {#pragma ignore-newlines} }
30+ { {#if (object.notnull? service.extends)} }
31+ { {#if service.extends.externalProgram?} }
32+ _{ {#each service.extends.program.py3Namespaces as |ns|} }{ {ns} }_{ {/each} }
33+ { {service.extends.program.name} }_clients.
34+ { {/if service.extends.externalProgram?} }
35+ { {service.extends.name} }
36+ { {#else } }
37+ thrift.py3.client.Client
38+ { {/if (object.notnull? service.extends)} }
39+ { {/let partial} }
2840{ {> common/auto_generated_py} }
29- { {^ program: auto_migrate?} }
41+ { {# if ( not program. auto_migrate?) } }
3042cimport thrift.py3.client
3143
32- { {#each program: includeNamespaces as |include |} }
44+ { {#each program. includeNamespaces as |include |} }
3345 { {#if include .import_services?} }
3446cimport { {include .modulePathPeriodSeparated} }.clients as _{ {include .modulePathUnderscoreSeparated} }_clients
3547 { {/if include .import_services?} }
3648{ {/each} }
3749
38- { {#program:services} }
39- cdef class { {service:name} }{ {#service:extends} }({ {#service:externalProgram?} }{ {!
40- } }_{ {#each service:program.py3Namespaces as |ns|} }{ {ns} }_{ {/each} }{ {!
41- } }{ {service:program.name} }_clients.{ {/service:externalProgram?} }{ {service:name} }{ {!
42- } }){ {/service:extends} }{ {^service:extends?} }(thrift.py3.client.Client){ {/service:extends?} }:
50+ { {#each program.services as |service|} }
51+ cdef class { {service.name} }({ {#partial client_base service= service} }):
4352 pass
4453
45- { {#let parent_service_name=service:name} }
46- { {#service:supportedInteractions} }
47- cdef class { {parent_service_name} }_{ {service:name} }(thrift.py3.client.Client):
54+ { {#each service.supportedInteractions as |interaction|} }
55+ cdef class { {service.name} }_{ {interaction.name} }(thrift.py3.client.Client):
4856 pass
4957
50- { {/service:supportedInteractions } }
51- { {/program:services } }
52- { {/program: auto_migrate?} }
58+ { {/each } }
59+ { {/each } }
60+ { {/if ( not program. auto_migrate?) } }
0 commit comments