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