Skip to content

Commit 12276b1

Browse files
committed
[Python] Add header to codegen-d files
1 parent 7e20cd4 commit 12276b1

File tree

124 files changed

+128
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+128
-1
lines changed

experimental/python/codegen/codegen/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
from codegen.generated_dataclass import GeneratedDataclass, GeneratedType
1616
from codegen.generated_enum import GeneratedEnum
1717

18+
HEADER = "# Code generated from jsonschema.json. DO NOT EDIT.\n"
19+
1820

1921
def main(output: str):
2022
schemas = openapi.get_schemas()
@@ -136,6 +138,7 @@ def _write_exports(
136138
exports.sort()
137139

138140
b = CodeBuilder()
141+
b.append(HEADER)
139142

140143
b.append("__all__ = [\n")
141144
for export in exports:
@@ -291,7 +294,8 @@ def _write_code(
291294
package_code[package] += "\n" + code
292295

293296
package_code = {
294-
package: generated_imports.get_code(
297+
package: HEADER
298+
+ generated_imports.get_code(
295299
dataclasses,
296300
enums,
297301
# don't import package from itself

experimental/python/databricks/bundles/compute/_models/adlsgen2_info.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Code generated from jsonschema.json. DO NOT EDIT.
12
from dataclasses import dataclass
23
from typing import TYPE_CHECKING, TypedDict
34

experimental/python/databricks/bundles/compute/_models/auto_scale.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Code generated from jsonschema.json. DO NOT EDIT.
12
from dataclasses import dataclass
23
from typing import TYPE_CHECKING, TypedDict
34

experimental/python/databricks/bundles/compute/_models/aws_attributes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Code generated from jsonschema.json. DO NOT EDIT.
12
from dataclasses import dataclass
23
from typing import TYPE_CHECKING, TypedDict
34

experimental/python/databricks/bundles/compute/_models/aws_availability.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Code generated from jsonschema.json. DO NOT EDIT.
12
from enum import Enum
23
from typing import Literal
34

experimental/python/databricks/bundles/compute/_models/azure_attributes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Code generated from jsonschema.json. DO NOT EDIT.
12
from dataclasses import dataclass
23
from typing import TYPE_CHECKING, TypedDict
34

experimental/python/databricks/bundles/compute/_models/azure_availability.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Code generated from jsonschema.json. DO NOT EDIT.
12
from enum import Enum
23
from typing import Literal
34

experimental/python/databricks/bundles/compute/_models/clients_types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Code generated from jsonschema.json. DO NOT EDIT.
12
from dataclasses import dataclass
23
from typing import TYPE_CHECKING, TypedDict
34

experimental/python/databricks/bundles/compute/_models/cluster_log_conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Code generated from jsonschema.json. DO NOT EDIT.
12
from dataclasses import dataclass
23
from typing import TYPE_CHECKING, TypedDict
34

experimental/python/databricks/bundles/compute/_models/cluster_spec.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Code generated from jsonschema.json. DO NOT EDIT.
12
from dataclasses import dataclass, field
23
from typing import TYPE_CHECKING, TypedDict
34

0 commit comments

Comments
 (0)