Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary bool() calls throughout project #2891

Merged
merged 1 commit into from
Dec 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -2753,7 +2753,7 @@ def registered_extensions():
Returns a dictionary containing all file extensions belonging
to registered plugins
"""
if not bool(EXTENSION):
if not EXTENSION:
init()
return EXTENSION

Expand Down
2 changes: 1 addition & 1 deletion Tests/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def skipKnownBadTest(self, msg=None, platform=None,
travis=None, interpreter=None):
# Skip if platform/travis matches, and
# PILLOW_RUN_KNOWN_BAD is not true in the environment.
if bool(os.environ.get('PILLOW_RUN_KNOWN_BAD', False)):
if os.environ.get('PILLOW_RUN_KNOWN_BAD', False):
print(os.environ.get('PILLOW_RUN_KNOWN_BAD', False))
return

Expand Down
2 changes: 1 addition & 1 deletion Tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def test_registered_extensions(self):
extensions = Image.registered_extensions()

# Assert
self.assertTrue(bool(extensions))
self.assertTrue(extensions)
for ext in ['.cur', '.icns', '.tif', '.tiff']:
self.assertIn(ext, extensions)

Expand Down