Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d0bc600

Browse files
committed
1.0.16 更新了 Optional[TreeNode]
1 parent d7fbac0 commit d0bc600

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ All notable changes to the "leetcode" extension will be documented in this file.
2323
更新了 imports.py random
2424
# 1.0.15
2525
更新了 imports.py random fix
26+
# 1.0.16
27+
更新了 Optional[TreeNode]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "python-leetcode",
33
"displayName": "PythonLeetcode",
44
"description": "Solve LeetCode problems in VS Code",
5-
"version": "1.0.15",
5+
"version": "1.0.16",
66
"author": "KuiyuanFu",
77
"publisher": "KuiyuanFu",
88
"license": "MIT",

src/leetCodeExecutor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,10 @@ class LeetCodeExecutor implements Disposable {
346346
p = p.slice(0, p.length - 1)
347347
}
348348

349-
if (paraItemPair[1] == 'ListNode') {
349+
if (paraItemPair[1] == 'ListNode'|| paraItemPair[1] == 'Optional[ListNode]') {
350350
return "listToListNode(" + p + ")"
351351
}
352-
else if (paraItemPair[1] == 'TreeNode') {
352+
else if (paraItemPair[1] == 'TreeNode' || paraItemPair[1] == 'Optional[TreeNode]') {
353353
p = p.replace(/null/g, 'None')
354354
return "listToTreeNode(" + p + ")"
355355
}

0 commit comments

Comments
 (0)