def __to_json__(self) -> t.Mapping[str, t.Any]:
"""Returns the JSON serializable representation of this class.
This representation also returns a count of the :class:`LinterState` of
the attached :class:`LinterInstance` objects.
:returns: A dict containing JSON serializable representations of the
attributes and the test state counts of this
AssignmentLinter.
"""
return {
'done': self.linters_done,
'working': self.linters_running,
'crashed': self.linters_crashed,
'id': self.id,
'name': self.name,
}
评论列表
文章目录