@@ -1678,13 +1678,14 @@ suggest_missing_self(PyFunctionObject *func, PyCodeObject *co,
16781678 }
16791679
16801680 if (first_argument == NULL || PyType_Check (first_argument )) {
1681- // When first arg is NULL, it's not really about self
1682- // If its a type object, then its a classmethod.
1681+ /* When first arg is NULL, it's not really about self.
1682+ If it's a type object, then it's a classmethod. */
16831683 return 0 ;
16841684 }
16851685
16861686 if (co -> co_argcount > 0 ) {
1687- // don't confuse the user when they've already declared a common convention of cls/self
1687+ /* Don't confuse the user when they've already declared a
1688+ common convention of cls/self. */
16881689 PyObject * first_parameter_name = PyTuple_GET_ITEM (co -> co_localsplusnames , 0 );
16891690 /* If the receiver parameter is already declared, another hint would be misleading. */
16901691 if (PyUnicode_CompareWithASCIIString (first_parameter_name , "self" ) == 0 ||
@@ -1693,7 +1694,7 @@ suggest_missing_self(PyFunctionObject *func, PyCodeObject *co,
16931694 return 0 ;
16941695 }
16951696 }
1696- // If the current function matches on the type, its likely worth adding the hint
1697+ /* If the current function matches on the type, it's likely worth adding the hint. */
16971698 PyTypeObject * self_cls = Py_TYPE (first_argument );
16981699 PyFunctionObject * possibly_current_function =
16991700 (PyFunctionObject * )_PyType_Lookup (self_cls , co -> co_name );
0 commit comments