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 1818 elif parts [- 1 ] == "__main__" :
1919 continue
2020
21- with mkdocs_gen_files .open (full_doc_path , "w" ) as fd :
21+ with mkdocs_gen_files .open (full_doc_path , "w" ) as fobj :
2222 identifier = "." .join (parts )
23- print ("::: " + identifier , file = fd )
23+ print ("::: " + identifier , file = fobj )
2424
2525 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():
222222 user_id = read_user_id (config_file_old )
223223 if user_id is None :
224224 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 )
227227
228228 if user_id .lower () != DO_NOT_TRACK_VALUE .lower ():
229229 return user_id
@@ -234,8 +234,8 @@ def _find_or_create_user_id():
234234
235235def read_user_id (config_file : Path ):
236236 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" ]
239239 except (FileNotFoundError , ValueError , KeyError ):
240240 pass
241241 return None
You can’t perform that action at this time.
0 commit comments