ResourceWarning: unclosed file
gregorias opened this issue · 1 comments
gregorias commented
Since 1795d65#diff-c99bbcfc0e7112a9ae7a56a9af9b33a1b503dafc3bbdaf6f2a753bd62fd2a6e4R122, Pyphen opens a dictionary without properly closing it at
Line 118 in 099eeb7
This results in a resource warning:
/Users/grzesiek/Code/anki/anki-word-hyphenator/deps/Pyphen/pyphen/__init__.py:118: ResourceWarning: unclosed file <_io.BufferedReader name='/Users/grzesiek/Code/anki/anki-word-hyphenator/deps/Pyphen/pyphen/dictionaries/hyph_en_US.dic'>
encoding = path.open('rb').readline().decode()
liZe commented
Thanks for the report!