mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-14 05:36:48 +03:00
d50445ff30
Similar to the recent adoption of Black. isort is a Python utility to sort imports alphabetically and automatically separate into sections. By using isort, contributors can quickly and automatically conform to the projects style without thinking. Just let the tool do it. Uses the configuration recommended by the Black to avoid conflicts of style. Rewrite TestImageQt.test_deprecated to no rely on import order.
17 lines
364 B
Python
17 lines
364 B
Python
from __future__ import print_function
|
|
|
|
import glob
|
|
import os
|
|
import sys
|
|
import traceback
|
|
|
|
sys.path.insert(0, ".")
|
|
|
|
for file in glob.glob("src/PIL/*.py"):
|
|
module = os.path.basename(file)[:-3]
|
|
try:
|
|
exec("from PIL import " + module)
|
|
except (ImportError, SyntaxError):
|
|
print("===", "failed to import", module)
|
|
traceback.print_exc()
|