Skip to content

Commit

Permalink
copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmcdonald3 committed May 7, 2024
1 parent a2ad26a commit 30ee7dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,11 @@ private void generateInits(CustomizeDirective<GenerationContext, PythonSettings>
var initPath = entry.getKey().resolve("__init__.py");
if (!entry.getValue().contains(initPath)) {
directive.fileManifest().writeFile(initPath,
"# Code generated by smithy-python-codegen DO NOT EDIT.\n");
"""
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
# Do not modify this file. This file is machine generated, and any changes to it will be overwritten.\n
""");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,12 @@ public PythonWriter maybeWrite(boolean shouldWrite, Object content, Object... ar
public String toString() {
String contents = getImportContainer().toString() + super.toString();
if (addCodegenWarningHeader) {
String header = "# Code generated by smithy-python-codegen DO NOT EDIT.\n\n";
String header =
"""
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
# Do not modify this file. This file is machine generated, and any changes to it will be overwritten.\n
""";
contents = header + contents;
}
return contents;
Expand Down

0 comments on commit 30ee7dd

Please sign in to comment.