Skip to content

Commit

Permalink
chore: improve TextResource repr
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Oct 16, 2023
1 parent d793b6f commit 6e19aa1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mknodes/utils/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ def __hash__(self):
return hash(self.content)

def __repr__(self):
return reprhelpers.dataclass_repr(self)
return reprhelpers.get_repr(self, filename=self.resolved_filename)


@dataclasses.dataclass(frozen=True)
@dataclasses.dataclass(frozen=True, repr=False)
class CSSText(TextResource):
"""Class representing non-file-bound CSS."""

Expand All @@ -176,7 +176,7 @@ def to_html(self) -> str:
return f"<style>\n{self.content}\n</style>"


@dataclasses.dataclass(frozen=True)
@dataclasses.dataclass(frozen=True, repr=False)
class JSText(TextResource):
"""Class representing non-file-bound JavaScript code."""

Expand Down

0 comments on commit 6e19aa1

Please sign in to comment.