Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Opening a file - without closing it later - will keep the file open. By using "with-as" this won't happen.
Reason I'm submitting this PR:
Whenever I run "import arabic_reshaper" in my scripts together with -W default -X tracemalloc=25 as arguments for Python, it'll show me that there is a ResourceWarning in your ini.py file.
C:\Users\XXX\Desktop\test\lib\site-packages\arabic_reshaper_init_.py:12: ResourceWarning: unclosed file <io.TextIOWrapper name='C:\Users\XXX\Desktop\test\lib\site-packages\arabic_reshaper\version.py' mode='r' encoding='cp1252'>
exec(open(os.path.join(os.path.dirname(file), 'version.py')).read())
Object allocated at (most recent call last):
File "C:/Users/XXX/Desktop/test/scratch.py", lineno 3
import arabic_reshaper
File "", lineno 991
File "", lineno 975
File "", lineno 671
File "", lineno 783
File "", lineno 219
File "C:\Users\XXX\Desktop\test\lib\site-packages\arabic_reshaper_init.py", lineno 12
exec(open(os.path.join(os.path.dirname(file), 'version.py')).read())