mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-14 21:56:56 +03:00
Apply suggestions from code review
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
b9d1768561
commit
8e332eb3b0
|
@ -16,4 +16,4 @@ def test_sanity() -> None:
|
||||||
|
|
||||||
with pytest.warns(DeprecationWarning):
|
with pytest.warns(DeprecationWarning):
|
||||||
ptrs = dict(im.im.unsafe_ptrs)
|
ptrs = dict(im.im.unsafe_ptrs)
|
||||||
assert all(k in ptrs for k in ["image8", "image32", "image"])
|
assert ptrs.keys() == {"image8", "image32", "image"}
|
||||||
|
|
|
@ -3706,7 +3706,7 @@ static PyObject *
|
||||||
_getattr_id(ImagingObject *self, void *closure) {
|
_getattr_id(ImagingObject *self, void *closure) {
|
||||||
if (PyErr_WarnEx(
|
if (PyErr_WarnEx(
|
||||||
PyExc_DeprecationWarning,
|
PyExc_DeprecationWarning,
|
||||||
"id property is deprecated and will be removed in Pillow 12.0",
|
"id property is deprecated and will be removed in Pillow 12 (2025-10-15)",
|
||||||
1
|
1
|
||||||
) < 0) {
|
) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -3732,7 +3732,8 @@ static PyObject *
|
||||||
_getattr_unsafe_ptrs(ImagingObject *self, void *closure) {
|
_getattr_unsafe_ptrs(ImagingObject *self, void *closure) {
|
||||||
if (PyErr_WarnEx(
|
if (PyErr_WarnEx(
|
||||||
PyExc_DeprecationWarning,
|
PyExc_DeprecationWarning,
|
||||||
"unsafe_ptrs property is deprecated and will be removed in Pillow 12.0",
|
"unsafe_ptrs property is deprecated and will be removed in Pillow 12 "
|
||||||
|
"(2025-10-15)",
|
||||||
1
|
1
|
||||||
) < 0) {
|
) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
static PyObject *
|
static PyObject *
|
||||||
apply(PyObject *self, PyObject *args) {
|
apply(PyObject *self, PyObject *args) {
|
||||||
const char *lut;
|
const char *lut;
|
||||||
PyObject *i0, *i1;
|
|
||||||
Py_ssize_t lut_len;
|
Py_ssize_t lut_len;
|
||||||
|
PyObject *i0, *i1;
|
||||||
Imaging imgin, imgout;
|
Imaging imgin, imgout;
|
||||||
int width, height;
|
int width, height;
|
||||||
int row_idx, col_idx;
|
int row_idx, col_idx;
|
||||||
|
@ -124,8 +124,8 @@ apply(PyObject *self, PyObject *args) {
|
||||||
static PyObject *
|
static PyObject *
|
||||||
match(PyObject *self, PyObject *args) {
|
match(PyObject *self, PyObject *args) {
|
||||||
const char *lut;
|
const char *lut;
|
||||||
PyObject *i0;
|
|
||||||
Py_ssize_t lut_len;
|
Py_ssize_t lut_len;
|
||||||
|
PyObject *i0;
|
||||||
Imaging imgin;
|
Imaging imgin;
|
||||||
int width, height;
|
int width, height;
|
||||||
int row_idx, col_idx;
|
int row_idx, col_idx;
|
||||||
|
|
|
@ -60,7 +60,7 @@ typedef struct ImagingHistogramInstance *ImagingHistogram;
|
||||||
typedef struct ImagingOutlineInstance *ImagingOutline;
|
typedef struct ImagingOutlineInstance *ImagingOutline;
|
||||||
typedef struct ImagingPaletteInstance *ImagingPalette;
|
typedef struct ImagingPaletteInstance *ImagingPalette;
|
||||||
|
|
||||||
/* handle magics (used with PyCObject). */
|
/* handle magics (used with PyCapsule). */
|
||||||
#define IMAGING_MAGIC "Pillow Imaging"
|
#define IMAGING_MAGIC "Pillow Imaging"
|
||||||
|
|
||||||
/* pixel types */
|
/* pixel types */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user