mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-10 13:27:36 +00:00
* standardizes ruff dep version across all `pyproject.toml` files * cli: ruff rules and corrections * langchain: rules and corrections
17 lines
438 B
Python
17 lines
438 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
|