Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix newlines
  • Loading branch information
hsheth2 committed Jun 17, 2021
commit 2b6f6333d6f6dbc38656f80b6f4d5136ce8b0b8b
3 changes: 1 addition & 2 deletions metadata-ingestion/scripts/avro_codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def suppress_checks_in_file(filepath: Union[str, Path]) -> None:

def _load_schema(schema_name: str) -> str:
return (pathlib.Path(__file__).parent / f"{schema_name}.avsc").read_text()

"""
individual_schema_method = """
@functools.lru_cache(maxsize=None)
Expand All @@ -93,7 +92,7 @@ def get{schema_name}Schema() -> str:


def make_load_schema_methods(schemas: Iterable[str]) -> str:
return load_schema_method + "\n".join(
return load_schema_method + "".join(
individual_schema_method.format(schema_name=schema) for schema in schemas
)

Expand Down
2 changes: 0 additions & 2 deletions metadata-ingestion/src/datahub/metadata/schemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@
def _load_schema(schema_name: str) -> str:
return (pathlib.Path(__file__).parent / f"{schema_name}.avsc").read_text()


@functools.lru_cache(maxsize=None)
def getMetadataChangeEventSchema() -> str:
return _load_schema("MetadataChangeEvent")


@functools.lru_cache(maxsize=None)
def getMetadataAuditEventSchema() -> str:
return _load_schema("MetadataAuditEvent")
Expand Down