Issue #28139: Merge indentation fixes from 3.5 into 3.6 · pythoncapi/cpython@d508d00 · GitHub
Skip to content

Commit d508d00

Browse files
committed
Issue python#28139: Merge indentation fixes from 3.5 into 3.6
2 parents abf275a + 6d57fe1 commit d508d00

7 files changed

Lines changed: 38 additions & 32 deletions

File tree

Include/unicodeobject.h

Lines changed: 1 addition & 1 deletion

Modules/_localemodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ copy_grouping(const char* s)
5454
int i;
5555
PyObject *result, *val = NULL;
5656

57-
if (s[0] == '\0')
57+
if (s[0] == '\0') {
5858
/* empty string: no grouping at all */
5959
return PyList_New(0);
60+
}
6061

6162
for (i = 0; s[i] != '\0' && s[i] != CHAR_MAX; i++)
6263
; /* nothing */

Modules/fcntlmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ conv_descriptor(PyObject *object, int *target)
2626
int fd = PyObject_AsFileDescriptor(object);
2727

2828
if (fd < 0)
29-
return 0;
29+
return 0;
3030
*target = fd;
3131
return 1;
3232
}

Modules/signalmodule.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,18 @@ itimer_retval(struct itimerval *iv)
154154

155155
r = PyTuple_New(2);
156156
if (r == NULL)
157-
return NULL;
157+
return NULL;
158158

159159
if(!(v = PyFloat_FromDouble(double_from_timeval(&iv->it_value)))) {
160-
Py_DECREF(r);
161-
return NULL;
160+
Py_DECREF(r);
161+
return NULL;
162162
}
163163

164164
PyTuple_SET_ITEM(r, 0, v);
165165

166166
if(!(v = PyFloat_FromDouble(double_from_timeval(&iv->it_interval)))) {
167-
Py_DECREF(r);
168-
return NULL;
167+
Py_DECREF(r);
168+
return NULL;
169169
}
170170

171171
PyTuple_SET_ITEM(r, 1, v);
@@ -1433,9 +1433,9 @@ PyInit__signal(void)
14331433

14341434
#if defined (HAVE_SETITIMER) || defined (HAVE_GETITIMER)
14351435
ItimerError = PyErr_NewException("signal.ItimerError",
1436-
PyExc_IOError, NULL);
1436+
PyExc_IOError, NULL);
14371437
if (ItimerError != NULL)
1438-
PyDict_SetItemString(d, "ItimerError", ItimerError);
1438+
PyDict_SetItemString(d, "ItimerError", ItimerError);
14391439
#endif
14401440

14411441
#ifdef CTRL_C_EVENT

Modules/socketmodule.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,12 +2061,13 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
20612061
return 1;
20622062
}
20632063
#endif /* AF_UNIX */
2064+
20642065
#if defined(AF_NETLINK)
2065-
case AF_NETLINK:
2066-
{
2067-
*len_ret = sizeof (struct sockaddr_nl);
2068-
return 1;
2069-
}
2066+
case AF_NETLINK:
2067+
{
2068+
*len_ret = sizeof (struct sockaddr_nl);
2069+
return 1;
2070+
}
20702071
#endif
20712072

20722073
#ifdef AF_RDS

Objects/funcobject.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,9 @@ PyTypeObject PyFunction_Type = {
674674
To declare a class method, use this idiom:
675675
676676
class C:
677-
def f(cls, arg1, arg2, ...): ...
678-
f = classmethod(f)
677+
@classmethod
678+
def f(cls, arg1, arg2, ...):
679+
...
679680
680681
It can be called either on the class (e.g. C.f()) or on an instance
681682
(e.g. C().f()); the instance is ignored except for its class.
@@ -785,8 +786,9 @@ just like an instance method receives the instance.\n\
785786
To declare a class method, use this idiom:\n\
786787
\n\
787788
class C:\n\
788-
def f(cls, arg1, arg2, ...): ...\n\
789-
f = classmethod(f)\n\
789+
@classmethod\n\
790+
def f(cls, arg1, arg2, ...):\n\
791+
...\n\
790792
\n\
791793
It can be called either on the class (e.g. C.f()) or on an instance\n\
792794
(e.g. C().f()). The instance is ignored except for its class.\n\
@@ -857,8 +859,9 @@ PyClassMethod_New(PyObject *callable)
857859
To declare a static method, use this idiom:
858860
859861
class C:
860-
def f(arg1, arg2, ...): ...
861-
f = staticmethod(f)
862+
@staticmethod
863+
def f(arg1, arg2, ...):
864+
...
862865
863866
It can be called either on the class (e.g. C.f()) or on an instance
864867
(e.g. C().f()); the instance is ignored except for its class.
@@ -963,8 +966,9 @@ A static method does not receive an implicit first argument.\n\
963966
To declare a static method, use this idiom:\n\
964967
\n\
965968
class C:\n\
966-
def f(arg1, arg2, ...): ...\n\
967-
f = staticmethod(f)\n\
969+
@staticmethod\n\
970+
def f(arg1, arg2, ...):\n\
971+
...\n\
968972
\n\
969973
It can be called either on the class (e.g. C.f()) or on an instance\n\
970974
(e.g. C().f()). The instance is ignored except for its class.\n\

PC/bdist_wininst/install.c

Lines changed: 9 additions & 9 deletions

0 commit comments

Comments
 (0)