即使在关闭 pylance 后括号也没有关闭
Brackets was not closed even after it closed pylance
我只是复制粘贴了这个我想在我的脚本中使用的代码块,但是这个由 pylance 抛出的红色标记说“(”“[”“{”没有关闭,但我找不到我错过的地方, 一切对我来说都很完美
for idx, sentence in enumerate(sentences):
text = sentence['text'].lower()
sentence['audio'].export('books/audio_output/sample-'+str(idx)+'.mp3', format="mp3")
temp_df = pd.DataFrame([{'filename':'sample-'+str(idx)+'.mp3",'text':text,'up_votes':0,'down_votes':0,'age':0,'gender':'male','accent':','duration':'}], columns=['filename','text','up_votes','down_votes','age','gender','accent','duration'])
df = df.append(temp_df)
temp_df = pd.DataFrame([{'filename':'sample-'+str(idx)+".mp3",
'text':text,'up_votes':0,'down_votes':0,'age':0,'gender':'male','accent':'','duration':''}],
columns=['filename','text','up_votes','down_votes','age','gender','accent','duration'])
df = df.append(temp_df)
我只是复制粘贴了这个我想在我的脚本中使用的代码块,但是这个由 pylance 抛出的红色标记说“(”“[”“{”没有关闭,但我找不到我错过的地方, 一切对我来说都很完美
for idx, sentence in enumerate(sentences):
text = sentence['text'].lower()
sentence['audio'].export('books/audio_output/sample-'+str(idx)+'.mp3', format="mp3")
temp_df = pd.DataFrame([{'filename':'sample-'+str(idx)+'.mp3",'text':text,'up_votes':0,'down_votes':0,'age':0,'gender':'male','accent':','duration':'}], columns=['filename','text','up_votes','down_votes','age','gender','accent','duration'])
df = df.append(temp_df)
temp_df = pd.DataFrame([{'filename':'sample-'+str(idx)+".mp3",
'text':text,'up_votes':0,'down_votes':0,'age':0,'gender':'male','accent':'','duration':''}],
columns=['filename','text','up_votes','down_votes','age','gender','accent','duration'])
df = df.append(temp_df)