mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-09 15:03:21 +00:00
text-splitters: Add ruff rules FBT (#31935)
See [flake8-boolean-trap (FBT)](https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt)
This commit is contained in:
committed by
GitHub
parent
4d9c0b0883
commit
060fc0e3c9
@@ -24,8 +24,8 @@ class MarkdownHeaderTextSplitter:
|
||||
def __init__(
|
||||
self,
|
||||
headers_to_split_on: list[tuple[str, str]],
|
||||
return_each_line: bool = False,
|
||||
strip_headers: bool = True,
|
||||
return_each_line: bool = False, # noqa: FBT001,FBT002
|
||||
strip_headers: bool = True, # noqa: FBT001,FBT002
|
||||
):
|
||||
"""Create a new MarkdownHeaderTextSplitter.
|
||||
|
||||
@@ -279,8 +279,8 @@ class ExperimentalMarkdownSyntaxTextSplitter:
|
||||
def __init__(
|
||||
self,
|
||||
headers_to_split_on: Union[list[tuple[str, str]], None] = None,
|
||||
return_each_line: bool = False,
|
||||
strip_headers: bool = True,
|
||||
return_each_line: bool = False, # noqa: FBT001,FBT002
|
||||
strip_headers: bool = True, # noqa: FBT001,FBT002
|
||||
):
|
||||
"""Initialize the text splitter with header splitting and formatting options.
|
||||
|
||||
|
Reference in New Issue
Block a user