Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bc459bb

Browse files
committed
Rename lzma.check_is_supported() to is_check_supported() to avoid grammatical confusion.
1 parent f55b329 commit bc459bb

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

Doc/library/lzma.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Compressing and decompressing data in memory
225225
Miscellaneous
226226
-------------
227227

228-
.. function:: check_is_supported(check)
228+
.. function:: is_check_supported(check)
229229

230230
Returns true if the given integrity check is supported on this system.
231231

Lib/lzma.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"MODE_FAST", "MODE_NORMAL", "PRESET_DEFAULT", "PRESET_EXTREME",
1919

2020
"LZMACompressor", "LZMADecompressor", "LZMAFile", "LZMAError",
21-
"compress", "decompress", "check_is_supported",
21+
"compress", "decompress", "is_check_supported",
2222
"encode_filter_properties", "decode_filter_properties",
2323
]
2424

Lib/test/test_lzma.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -935,14 +935,14 @@ class MiscellaneousTestCase(unittest.TestCase):
935935
def test_is_check_supported(self):
936936
# CHECK_NONE and CHECK_CRC32 should always be supported,
937937
# regardless of the options liblzma was compiled with.
938-
self.assertTrue(lzma.check_is_supported(lzma.CHECK_NONE))
939-
self.assertTrue(lzma.check_is_supported(lzma.CHECK_CRC32))
938+
self.assertTrue(lzma.is_check_supported(lzma.CHECK_NONE))
939+
self.assertTrue(lzma.is_check_supported(lzma.CHECK_CRC32))
940940

941941
# The .xz format spec cannot store check IDs above this value.
942-
self.assertFalse(lzma.check_is_supported(lzma.CHECK_ID_MAX + 1))
942+
self.assertFalse(lzma.is_check_supported(lzma.CHECK_ID_MAX + 1))
943943

944944
# This value should not be a valid check ID.
945-
self.assertFalse(lzma.check_is_supported(lzma.CHECK_UNKNOWN))
945+
self.assertFalse(lzma.is_check_supported(lzma.CHECK_UNKNOWN))
946946

947947
def test_encode_filter_properties(self):
948948
with self.assertRaises(TypeError):

Modules/_lzmamodule.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,19 +1075,19 @@ static PyTypeObject Decompressor_type = {
10751075

10761076
/* Module-level functions. */
10771077

1078-
PyDoc_STRVAR(check_is_supported_doc,
1079-
"check_is_supported(check_id) -> bool\n"
1078+
PyDoc_STRVAR(is_check_supported_doc,
1079+
"is_check_supported(check_id) -> bool\n"
10801080
"\n"
10811081
"Test whether the given integrity check is supported.\n"
10821082
"\n"
10831083
"Always returns True for CHECK_NONE and CHECK_CRC32.\n");
10841084

10851085
static PyObject *
1086-
check_is_supported(PyObject *self, PyObject *args)
1086+
is_check_supported(PyObject *self, PyObject *args)
10871087
{
10881088
int check_id;
10891089

1090-
if (!PyArg_ParseTuple(args, "i:check_is_supported", &check_id))
1090+
if (!PyArg_ParseTuple(args, "i:is_check_supported", &check_id))
10911091
return NULL;
10921092

10931093
return PyBool_FromLong(lzma_check_is_supported(check_id));
@@ -1182,8 +1182,8 @@ decode_filter_properties(PyObject *self, PyObject *args)
11821182
/* Module initialization. */
11831183

11841184
static PyMethodDef module_methods[] = {
1185-
{"check_is_supported", (PyCFunction)check_is_supported,
1186-
METH_VARARGS, check_is_supported_doc},
1185+
{"is_check_supported", (PyCFunction)is_check_supported,
1186+
METH_VARARGS, is_check_supported_doc},
11871187
{"encode_filter_properties", (PyCFunction)encode_filter_properties,
11881188
METH_VARARGS, encode_filter_properties_doc},
11891189
{"decode_filter_properties", (PyCFunction)decode_filter_properties,

0 commit comments

Comments
 (0)