-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ResourceWarning in tests (and more) (#225)
* Fix ResourceWarnings caused by open().read() For instance: ``` aeidon/test/test_encodings.py:166: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/gaupol-my14g87e.srt'> blob = open(path, "rb").read() ``` * Fix ResourceWarnings caused by open().write() For example: ``` aeidon/test/test_encodings.py:167: ResourceWarning: unclosed file <_io.BufferedWriter name='/tmp/gaupol-my14g87e.srt'> open(path, "wb").write(codecs.BOM_UTF16_BE + blob) ``` * Fix mode ResourceWarnings by replacing f = open() Some of these changes are not strictly necessary as the file descriptor was properly closed in some cases but I decided to change them for increased consistency.
- Loading branch information
Showing
16 changed files
with
129 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,16 @@ | |
shutil.copytree("data/headers", "aeidon/data/headers") | ||
shutil.copytree("data/patterns", "aeidon/data/patterns") | ||
|
||
with open("README.aeidon.md", "r") as f: | ||
long_description = f.read() | ||
|
||
setup( | ||
name="aeidon", | ||
version=get_aeidon_version(), | ||
author="Osmo Salomaa", | ||
author_email="[email protected]", | ||
description="Reading, writing and manipulating text-based subtitle files", | ||
long_description=open("README.aeidon.md", "r").read(), | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/otsaloma/gaupol", | ||
license="GPL", | ||
|
Oops, something went wrong.