Skip to content

Commit bb75a2d

Browse files
Undo unintential indentation changes
1 parent cea2326 commit bb75a2d

File tree

1 file changed

+28
-28
lines changed
  • codegen/smithy-python-codegen/src/main/java/software/amazon/smithy/python/codegen

1 file changed

+28
-28
lines changed

codegen/smithy-python-codegen/src/main/java/software/amazon/smithy/python/codegen/ClientGenerator.java

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ async def _handle_attempt(
356356
)
357357
358358
""", CodegenUtils.getHttpAuthParamsSymbol(context.settings()),
359-
writer.consumer(this::initializeHttpAuthParameters));
359+
writer.consumer(this::initializeHttpAuthParameters));
360360
writer.popState();
361361

362362
writer.addDependency(SmithyPythonDependency.SMITHY_CORE);
@@ -649,48 +649,48 @@ private void generateOperation(PythonWriter writer, OperationShape operation) {
649649

650650
writer.openBlock("async def $L(self, input: $T, plugins: list[$T] | None = None) -> $T:", "",
651651
operationSymbol.getName(), inputSymbol, pluginSymbol, outputSymbol, () -> {
652-
writer.writeDocs(() -> {
653-
var docs = operation.getTrait(DocumentationTrait.class)
654-
.map(StringTrait::getValue)
655-
.orElse(String.format("Invokes the %s operation.", operation.getId().getName()));
652+
writer.writeDocs(() -> {
653+
var docs = operation.getTrait(DocumentationTrait.class)
654+
.map(StringTrait::getValue)
655+
.orElse(String.format("Invokes the %s operation.", operation.getId().getName()));
656656

657-
var inputDocs = input.getTrait(DocumentationTrait.class)
658-
.map(StringTrait::getValue)
659-
.orElse("The operation's input.");
657+
var inputDocs = input.getTrait(DocumentationTrait.class)
658+
.map(StringTrait::getValue)
659+
.orElse("The operation's input.");
660660

661-
writer.write("""
661+
writer.write("""
662662
$L
663663
664664
:param input: $L
665665
666666
:param plugins: A list of callables that modify the configuration dynamically.
667667
Changes made by these plugins only apply for the duration of the operation
668668
execution and will not affect any other operation invocations.""", docs, inputDocs);
669-
});
670-
671-
var defaultPlugins = new LinkedHashSet<SymbolReference>();
672-
for (PythonIntegration integration : context.integrations()) {
673-
for (RuntimeClientPlugin runtimeClientPlugin : integration.getClientPlugins()) {
674-
if (runtimeClientPlugin.matchesOperation(context.model(), service, operation)) {
675-
runtimeClientPlugin.getPythonPlugin().ifPresent(defaultPlugins::add);
676-
}
677-
}
669+
});
670+
671+
var defaultPlugins = new LinkedHashSet<SymbolReference>();
672+
for (PythonIntegration integration : context.integrations()) {
673+
for (RuntimeClientPlugin runtimeClientPlugin : integration.getClientPlugins()) {
674+
if (runtimeClientPlugin.matchesOperation(context.model(), service, operation)) {
675+
runtimeClientPlugin.getPythonPlugin().ifPresent(defaultPlugins::add);
678676
}
679-
writer.write("""
677+
}
678+
}
679+
writer.write("""
680680
operation_plugins: list[Plugin] = [
681681
$C
682682
]
683683
if plugins:
684684
operation_plugins.extend(plugins)
685685
""", writer.consumer(w -> writeDefaultPlugins(w, defaultPlugins)));
686686

687-
if (context.protocolGenerator() == null) {
688-
writer.write("raise NotImplementedError()");
689-
} else {
690-
var protocolGenerator = context.protocolGenerator();
691-
var serSymbol = protocolGenerator.getSerializationFunction(context, operation);
692-
var deserSymbol = protocolGenerator.getDeserializationFunction(context, operation);
693-
writer.write("""
687+
if (context.protocolGenerator() == null) {
688+
writer.write("raise NotImplementedError()");
689+
} else {
690+
var protocolGenerator = context.protocolGenerator();
691+
var serSymbol = protocolGenerator.getSerializationFunction(context, operation);
692+
var deserSymbol = protocolGenerator.getDeserializationFunction(context, operation);
693+
writer.write("""
694694
return await self._execute_operation(
695695
input=input,
696696
plugins=operation_plugins,
@@ -700,8 +700,8 @@ private void generateOperation(PythonWriter writer, OperationShape operation) {
700700
operation_name=$S,
701701
)
702702
""", serSymbol, deserSymbol, operation.getId().getName());
703-
}
704-
});
703+
}
704+
});
705705
}
706706

707707
private void generateEventStreamOperation(PythonWriter writer, OperationShape operation) {

0 commit comments

Comments
 (0)