Fix lint violation to be 3.8 aware

PiperOrigin-RevId: 309149140
Change-Id: I6e4dad05081429007a027986169c95bd9bcdce5f
This commit is contained in:
Gaurav Jain 2020-04-29 20:03:15 -07:00 committed by TensorFlower Gardener
parent 8314abe2e5
commit e47b52c7ff
4 changed files with 49 additions and 25 deletions

View File

@ -342,7 +342,11 @@ PyTypeObject PyBfloat16_Type = {
sizeof(PyBfloat16), // tp_basicsize
0, // tp_itemsize
nullptr, // tp_dealloc
0, // tp_vectorcall_offset NOLINT
#if PY_VERSION_HEX < 0x03080000
nullptr, // tp_print
#else
0, // tp_vectorcall_offset
#endif
nullptr, // tp_getattr
nullptr, // tp_setattr
nullptr, // tp_compare / tp_reserved

View File

@ -762,7 +762,11 @@ static PyTypeObject _EagerTensorType = {
sizeof(EagerTensor), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)EagerTensor_dealloc, /* tp_dealloc */
0, /* tp_vectorcall_offset */
#if PY_VERSION_HEX < 0x03080000
nullptr, /* tp_print */
#else
0, /* tp_vectorcall_offset */
#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_compare */

View File

@ -1504,22 +1504,26 @@ static PyTypeObject TFE_Py_Tape_Type = {
sizeof(TFE_Py_Tape), /* tp_basicsize */
0, /* tp_itemsize */
&TFE_Py_Tape_Delete, /* tp_dealloc */
0, /* tp_vectorcall_offset */
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
nullptr, /* tp_repr */
nullptr, /* tp_as_number */
nullptr, /* tp_as_sequence */
nullptr, /* tp_as_mapping */
nullptr, /* tp_hash */
nullptr, /* tp_call */
nullptr, /* tp_str */
nullptr, /* tp_getattro */
nullptr, /* tp_setattro */
nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
"TFE_Py_Tape objects", /* tp_doc */
#if PY_VERSION_HEX < 0x03080000
nullptr, /* tp_print */
#else
0, /* tp_vectorcall_offset */
#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
nullptr, /* tp_repr */
nullptr, /* tp_as_number */
nullptr, /* tp_as_sequence */
nullptr, /* tp_as_mapping */
nullptr, /* tp_hash */
nullptr, /* tp_call */
nullptr, /* tp_str */
nullptr, /* tp_getattro */
nullptr, /* tp_setattro */
nullptr, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
"TFE_Py_Tape objects", /* tp_doc */
};
typedef struct {
@ -1542,7 +1546,11 @@ static PyTypeObject TFE_Py_ForwardAccumulator_Type = {
sizeof(TFE_Py_ForwardAccumulator), /* tp_basicsize */
0, /* tp_itemsize */
&TFE_Py_ForwardAccumulatorDelete, /* tp_dealloc */
0, /* tp_vectorcall_offset */
#if PY_VERSION_HEX < 0x03080000
nullptr, /* tp_print */
#else
0, /* tp_vectorcall_offset */
#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */
@ -1577,7 +1585,11 @@ static PyTypeObject TFE_Py_VariableWatcher_Type = {
sizeof(TFE_Py_VariableWatcher), /* tp_basicsize */
0, /* tp_itemsize */
&TFE_Py_VariableWatcher_Delete, /* tp_dealloc */
0, /* tp_vectorcall_offset */
#if PY_VERSION_HEX < 0x03080000
nullptr, /* tp_print */
#else
0, /* tp_vectorcall_offset */
#endif
nullptr, /* tp_getattr */
nullptr, /* tp_setattr */
nullptr, /* tp_reserved */

View File

@ -313,11 +313,15 @@ PyTypeObject PyBfloat16_Type = {
#else
PyVarObject_HEAD_INIT(nullptr, 0)
#endif
"bfloat16", // tp_name
sizeof(PyBfloat16), // tp_basicsize
0, // tp_itemsize
nullptr, // tp_dealloc
0, // tp_vectorcall_offset
"bfloat16", // tp_name
sizeof(PyBfloat16), // tp_basicsize
0, // tp_itemsize
nullptr, // tp_dealloc
#if PY_VERSION_HEX < 0x03080000
nullptr, // tp_print
#else
0, // tp_vectorcall_offset
#endif
nullptr, // tp_getattr
nullptr, // tp_setattr
nullptr, // tp_compare / tp_reserved