diff options
author | kickbutt <kickbutt@yandex-team.com> | 2024-01-23 23:36:43 +0300 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-01-24 15:02:13 +0300 |
commit | 299dc21a6f70a16b00e1d564fa56961331552415 (patch) | |
tree | 183f498a2e98a04f9a6143a11006ba0c10f867f3 /contrib/python/Pillow/py3/PIL/SgiImagePlugin.py | |
parent | 5ccb6ae864be6b53df427dc3a0fa14dbb95aa11c (diff) | |
download | ydb-299dc21a6f70a16b00e1d564fa56961331552415.tar.gz |
Fix separator in CUDA_ARCHITECTURES
Diffstat (limited to 'contrib/python/Pillow/py3/PIL/SgiImagePlugin.py')
-rw-r--r-- | contrib/python/Pillow/py3/PIL/SgiImagePlugin.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/python/Pillow/py3/PIL/SgiImagePlugin.py b/contrib/python/Pillow/py3/PIL/SgiImagePlugin.py index acb9ce5a38..f9a10f6109 100644 --- a/contrib/python/Pillow/py3/PIL/SgiImagePlugin.py +++ b/contrib/python/Pillow/py3/PIL/SgiImagePlugin.py @@ -20,7 +20,7 @@ # # See the README file for information on usage and redistribution. # - +from __future__ import annotations import os import struct @@ -123,7 +123,7 @@ class SgiImageFile(ImageFile.ImageFile): def _save(im, fp, filename): - if im.mode != "RGB" and im.mode != "RGBA" and im.mode != "L": + if im.mode not in {"RGB", "RGBA", "L"}: msg = "Unsupported SGI image mode" raise ValueError(msg) @@ -155,7 +155,7 @@ def _save(im, fp, filename): # Z Dimension: Number of channels z = len(im.mode) - if dim == 1 or dim == 2: + if dim in {1, 2}: z = 1 # assert we've got the right number of bands. |