File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 18
18
elif parts [- 1 ] == "__main__" :
19
19
continue
20
20
21
- with mkdocs_gen_files .open (full_doc_path , "w" ) as fd :
21
+ with mkdocs_gen_files .open (full_doc_path , "w" ) as fobj :
22
22
identifier = "." .join (parts )
23
- print ("::: " + identifier , file = fd )
23
+ print ("::: " + identifier , file = fobj )
24
24
25
25
mkdocs_gen_files .set_edit_path (full_doc_path , path )
Original file line number Diff line number Diff line change @@ -222,8 +222,8 @@ def _find_or_create_user_id():
222
222
user_id = read_user_id (config_file_old )
223
223
if user_id is None :
224
224
user_id = generate_id ()
225
- with config_file .open (mode = "w" , encoding = "utf8" ) as fd :
226
- json .dump ({"user_id" : user_id }, fd )
225
+ with config_file .open (mode = "w" , encoding = "utf8" ) as fobj :
226
+ json .dump ({"user_id" : user_id }, fobj )
227
227
228
228
if user_id .lower () != DO_NOT_TRACK_VALUE .lower ():
229
229
return user_id
@@ -234,8 +234,8 @@ def _find_or_create_user_id():
234
234
235
235
def read_user_id (config_file : Path ):
236
236
try :
237
- with config_file .open (encoding = "utf8" ) as fd :
238
- return json .load (fd )["user_id" ]
237
+ with config_file .open (encoding = "utf8" ) as fobj :
238
+ return json .load (fobj )["user_id" ]
239
239
except (FileNotFoundError , ValueError , KeyError ):
240
240
pass
241
241
return None
You can’t perform that action at this time.
0 commit comments