Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep consistent generate_markdown signature #148

Merged
merged 2 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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}"