mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Merge pull request #2891 from jdufresne/bool-expr
Remove unnecessary bool() calls throughout project
This commit is contained in:
commit
384da7dbd8
|
@ -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
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ class PillowTestCase(unittest.TestCase):
|
|||
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
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ class TestImage(PillowTestCase):
|
|||
extensions = Image.registered_extensions()
|
||||
|
||||
# Assert
|
||||
self.assertTrue(bool(extensions))
|
||||
self.assertTrue(extensions)
|
||||
for ext in ['.cur', '.icns', '.tif', '.tiff']:
|
||||
self.assertIn(ext, extensions)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user