Skip to content

Commit

Permalink
add language metadata field (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
clavedeluna authored Apr 18, 2024
1 parent 6808b55 commit a23cbf7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/codemodder/codemods/base_codemod.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Metadata:
references: list[Reference] = field(default_factory=list)
description: str | None = None
tool: ToolMetadata | None = None
language: str = "python"


@dataclass
Expand Down Expand Up @@ -95,9 +96,13 @@ def docs_module_path(self) -> str: ...
def name(self) -> str:
return self._metadata.name

@property
def language(self) -> str:
return self._metadata.language

@property
def id(self) -> str:
return f"{self.origin}:python/{self.name}"
return f"{self.origin}:{self.language}/{self.name}"

@property
def summary(self):
Expand Down

0 comments on commit a23cbf7

Please sign in to comment.