Skip to content

Commit

Permalink
keep consistent generate_markdown signature (#148)
Browse files Browse the repository at this point in the history
* keep consistent generate_markdown signature

* keep consistent matches signature
  • Loading branch information
dberenbaum authored Jan 20, 2024
1 parent 61ee409 commit f1cb983
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/dvc_render/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ def generate_markdown(self, report_path: Optional[StrPath] = None) -> str: # py
raise NotImplementedError

@classmethod
def matches(cls, filename) -> bool: # pylint: disable=unused-argument
def matches(cls, filename, properties=None) -> bool: # noqa: ARG003
"Check if the Renderer is suitable."
return Path(filename).suffix in cls.EXTENSIONS
2 changes: 1 addition & 1 deletion src/dvc_render/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def partial_html(self, html_path=None, **kwargs) -> str: # noqa: ARG002
return "\n".join(div_content)
return ""

def generate_markdown(self) -> str: # type: ignore[override]
def generate_markdown(self, report_path=None) -> str: # noqa: ARG002
content = []
for datapoint in self.datapoints:
src = datapoint[self.SRC_FIELD]
Expand Down
2 changes: 1 addition & 1 deletion src/dvc_render/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ def to_tabulate(cls, datapoints, tablefmt):
def partial_html(self, **kwargs) -> str: # noqa: ARG002
return self.to_tabulate(self.datapoints, tablefmt="html")

def generate_markdown(self) -> str: # type: ignore[override]
def generate_markdown(self, report_path=None) -> str: # noqa: ARG002
table = self.to_tabulate(self.datapoints, tablefmt="github")
return f"\n{self.name}\n\n{table}"

0 comments on commit f1cb983

Please sign in to comment.