Fix: All open() calls should be in a "with open() as x" statement to ensure closing the file when exiting the block in any way. Otherwise, use the new file_read_text() or file_write_text() thin wrapper functions to read or write the whole utf-8 text file and closing it.
A number of such warnings showed up when running (with wireviz v0.4) e.g.
See https://github.com/wireviz/WireViz/pull/309#issuecomment-2170988381
Fix: All
open()
calls should be in a "with open() as x
" statement to ensure closing the file when exiting the block in any way. Otherwise, use the newfile_read_text()
orfile_write_text()
thin wrapper functions to read or write the whole utf-8 text file and closing it.