chore: fix invalid escape sequences by applying W605 rule (#4851)
This commit is contained in:
parent
23498883d4
commit
b234710af9
@ -701,7 +701,7 @@ class RecursiveCharacterTextSplitter(TextSplitter):
|
|||||||
# Split along section titles
|
# Split along section titles
|
||||||
"\n=+\n",
|
"\n=+\n",
|
||||||
"\n-+\n",
|
"\n-+\n",
|
||||||
"\n\*+\n",
|
"\n\\*+\n",
|
||||||
# Split along directive markers
|
# Split along directive markers
|
||||||
"\n\n.. *\n\n",
|
"\n\n.. *\n\n",
|
||||||
# Split by the normal type of lines
|
# Split by the normal type of lines
|
||||||
@ -800,7 +800,7 @@ class RecursiveCharacterTextSplitter(TextSplitter):
|
|||||||
# End of code block
|
# End of code block
|
||||||
"```\n",
|
"```\n",
|
||||||
# Horizontal lines
|
# Horizontal lines
|
||||||
"\n\*\*\*+\n",
|
"\n\\*\\*\\*+\n",
|
||||||
"\n---+\n",
|
"\n---+\n",
|
||||||
"\n___+\n",
|
"\n___+\n",
|
||||||
# Note that this splitter doesn't handle horizontal lines defined
|
# Note that this splitter doesn't handle horizontal lines defined
|
||||||
@ -813,10 +813,10 @@ class RecursiveCharacterTextSplitter(TextSplitter):
|
|||||||
elif language == Language.LATEX:
|
elif language == Language.LATEX:
|
||||||
return [
|
return [
|
||||||
# First, try to split along Latex sections
|
# First, try to split along Latex sections
|
||||||
"\n\\\chapter{",
|
"\n\\\\chapter{",
|
||||||
"\n\\\section{",
|
"\n\\\\section{",
|
||||||
"\n\\\subsection{",
|
"\n\\\\subsection{",
|
||||||
"\n\\\subsubsection{",
|
"\n\\\\subsubsection{",
|
||||||
# Now split by environments
|
# Now split by environments
|
||||||
"\n\\\begin{enumerate}",
|
"\n\\\begin{enumerate}",
|
||||||
"\n\\\begin{itemize}",
|
"\n\\\begin{itemize}",
|
||||||
|
@ -15,6 +15,7 @@ select = [
|
|||||||
"UP", # pyupgrade rules
|
"UP", # pyupgrade rules
|
||||||
"RUF019", # unnecessary-key-check
|
"RUF019", # unnecessary-key-check
|
||||||
"S506", # unsafe-yaml-load
|
"S506", # unsafe-yaml-load
|
||||||
|
"W605", # invalid-escape-sequence
|
||||||
]
|
]
|
||||||
ignore = [
|
ignore = [
|
||||||
"F403", # undefined-local-with-import-star
|
"F403", # undefined-local-with-import-star
|
||||||
|
@ -305,7 +305,7 @@ class WorkflowConverter:
|
|||||||
}
|
}
|
||||||
|
|
||||||
request_body_json = json.dumps(request_body)
|
request_body_json = json.dumps(request_body)
|
||||||
request_body_json = request_body_json.replace('\{\{', '{{').replace('\}\}', '}}')
|
request_body_json = request_body_json.replace(r'\{\{', '{{').replace(r'\}\}', '}}')
|
||||||
|
|
||||||
http_request_node = {
|
http_request_node = {
|
||||||
"id": f"http_request_{index}",
|
"id": f"http_request_{index}",
|
||||||
|
Loading…
Reference in New Issue
Block a user