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

Commit 2470211

Browse files
authored
Update lc.py
fixed refractor erros
1 parent 6ba72cf commit 2470211

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

lc.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,25 +167,20 @@ def print_submission_result(submission): # used python-leetocde library
167167
def initialize_leetcode_api_instance(
168168
leetcode_session, leetcode_csrf_token
169169
): # used python-leetocde library
170-
configuration = leetcode \
171-
.Configuration()
170+
configuration = leetcode.Configuration()
172171
csrf_token = leetcode_csrf_token
173-
174172
configuration.api_key["x-csrftoken"] = csrf_token
175173
configuration.api_key["csrftoken"] = csrf_token
176174
configuration.api_key["LEETCODE_SESSION"] = leetcode_session
177-
configuration.api_key["Referer"] = "https://leetcode.com"
175+
configuration.api_key["Referer"] = "https://.com"
178176
configuration.debug = False
179177

180-
api_instance = leetcode \
181-
.DefaultApi(leetcode
182-
.ApiClient(configuration))
178+
api_instance = .DefaultApi(.ApiClient(configuration))
183179
return api_instance
184180

185181

186182
def interpret_solution(title_slug, payload, api_instance):
187-
test_submission = leetcode \
188-
.TestSubmission(
183+
test_submission = .TestSubmission(
189184
data_input=payload["data_input"],
190185
typed_code=payload["typed_code"],
191186
question_id=payload["question_id"],

0 commit comments

Comments
 (0)