Skip to content

Commit 4c79aec

Browse files
committed
put returns on their own lines
1 parent 0013783 commit 4c79aec

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

Objects/exceptions.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ BaseException_set_args(PyBaseExceptionObject *self, PyObject *val)
306306
return -1;
307307
}
308308
seq = PySequence_Tuple(val);
309-
if (!seq) return -1;
309+
if (!seq)
310+
return -1;
310311
Py_CLEAR(self->args);
311312
self->args = seq;
312313
return 0;
@@ -773,7 +774,8 @@ EnvironmentError_reduce(PyEnvironmentErrorObject *self)
773774
* file name given to EnvironmentError. */
774775
if (PyTuple_GET_SIZE(args) == 2 && self->filename) {
775776
args = PyTuple_New(3);
776-
if (!args) return NULL;
777+
if (!args)
778+
return NULL;
777779

778780
tmp = PyTuple_GET_ITEM(self->args, 0);
779781
Py_INCREF(tmp);
@@ -1071,7 +1073,8 @@ SyntaxError_init(PySyntaxErrorObject *self, PyObject *args, PyObject *kwds)
10711073
if (lenargs == 2) {
10721074
info = PyTuple_GET_ITEM(args, 1);
10731075
info = PySequence_Tuple(info);
1074-
if (!info) return -1;
1076+
if (!info)
1077+
return -1;
10751078

10761079
if (PyTuple_GET_SIZE(info) != 4) {
10771080
/* not a very good error message, but it's what Python 2.4 gives */
@@ -1167,9 +1170,11 @@ SyntaxError_str(PySyntaxErrorObject *self)
11671170
str = PyObject_Str(self->msg);
11681171
else
11691172
str = PyObject_Str(Py_None);
1170-
if (!str) return NULL;
1173+
if (!str)
1174+
return NULL;
11711175
/* Don't fiddle with non-string return (shouldn't happen anyway) */
1172-
if (!PyString_Check(str)) return str;
1176+
if (!PyString_Check(str))
1177+
return str;
11731178

11741179
/* XXX -- do all the additional formatting with filename and
11751180
lineno here */
@@ -2111,7 +2116,8 @@ _PyExc_Init(void)
21112116

21122117
m = Py_InitModule4("exceptions", functions, exceptions_doc,
21132118
(PyObject *)NULL, PYTHON_API_VERSION);
2114-
if (m == NULL) return;
2119+
if (m == NULL)
2120+
return;
21152121

21162122
bltinmod = PyImport_ImportModule("__builtin__");
21172123
if (bltinmod == NULL)

0 commit comments

Comments
 (0)