Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit02e0c1a

Browse files
committed
add docstrings
1 parentb0aa1cd commit02e0c1a

File tree

2 files changed

+87
-84
lines changed

2 files changed

+87
-84
lines changed

‎dialoghelper/core.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def msg_insert_line(
233233
new_str:str,# Text to insert at the specified line
234234
dname:str=''# Running dialog to get info for; defaults to current dialog
235235
):
236-
"Get the `Message` object indexed in the current dialog."
236+
"Insert text at a specific line number in a message"
237237
returncall_endp('msg_insert_line_',dname,json=True,msgid=msgid,insert_line=insert_line,new_str=new_str)
238238

239239
# %% ../nbs/00_core.ipynb
@@ -243,7 +243,7 @@ def msg_str_replace(
243243
new_str:str,# Text to replace with
244244
dname:str=''# Running dialog to get info for; defaults to current dialog
245245
):
246-
"Get the `Message` object indexed in the current dialog."
246+
"Replace first occurrence of old_str with new_str in a message"
247247
returncall_endp('msg_str_replace_',dname,json=True,msgid=msgid,old_str=old_str,new_str=new_str)
248248

249249
# %% ../nbs/00_core.ipynb
@@ -253,6 +253,7 @@ def msg_strs_replace(
253253
new_strs:list[str],# List of replacement strings (must match length of old_strs)
254254
dname:str=''# Running dialog to get info for; defaults to current dialog
255255
):
256+
"Replace multiple strings simultaneously in a message"
256257
returncall_endp('msg_strs_replace_',dname,json=True,msgid=msgid,old_strs=old_strs,new_strs=new_strs)
257258

258259
# %% ../nbs/00_core.ipynb
@@ -263,6 +264,7 @@ def msg_replace_lines(
263264
new_content:str,# New content to replace the specified lines
264265
dname:str=''# Running dialog to get info for; defaults to current dialog
265266
):
267+
"Replace a range of lines with new content in a message"
266268
returncall_endp('msg_replace_lines_',dname,json=True,msgid=msgid,start_line=start_line,end_line=end_line,new_content=new_content)
267269

268270
# %% ../nbs/00_core.ipynb

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp