You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/cli/tests/unit_tests/migrate/cli_runner/file.py

17 lines
435 B
Python

from __future__ import annotations
class File:
def __init__(self, name: str, content: list[str] | None = None) -> None:
self.name = name
self.content = "\n".join(content or [])
def __eq__(self, __value: object) -> bool:
if not isinstance(__value, File):
return NotImplemented
if self.name != __value.name:
return False
return self.content == __value.content