1382 functionName.endswith('__'): |
1382 functionName.endswith('__'): |
1383 if firstWord != 'special': |
1383 if firstWord != 'special': |
1384 self.__error(docstringContext.start() + lineNumber, 0, |
1384 self.__error(docstringContext.start() + lineNumber, 0, |
1385 "D232", 'special') |
1385 "D232", 'special') |
1386 elif context.special() == "staticmethod": |
1386 elif context.special() == "staticmethod": |
1387 if firstWord != 'static': |
1387 secondWord = summary.strip().split(None, 2)[1].lower() |
|
1388 if firstWord != 'static' and secondWord != 'static': |
1388 self.__error(docstringContext.start() + lineNumber, 0, |
1389 self.__error(docstringContext.start() + lineNumber, 0, |
1389 "D232", 'static') |
1390 "D232", 'static') |
|
1391 elif secondWord == 'static': |
|
1392 if functionName.startswith(('__', 'on_')): |
|
1393 if firstWord != 'private': |
|
1394 self.__error(docstringContext.start() + lineNumber, |
|
1395 0, "D232", 'private static') |
|
1396 elif functionName.startswith('_') or \ |
|
1397 functionName.endswith('Event'): |
|
1398 if firstWord != 'protected': |
|
1399 self.__error(docstringContext.start() + lineNumber, |
|
1400 0, "D232", 'protected static') |
|
1401 else: |
|
1402 if firstWord != 'public': |
|
1403 self.__error(docstringContext.start() + lineNumber, |
|
1404 0, "D232", 'public static') |
1390 elif arguments.startswith(('cls,', 'cls)')) or \ |
1405 elif arguments.startswith(('cls,', 'cls)')) or \ |
1391 context.special() == "classmethod": |
1406 context.special() == "classmethod": |
1392 secondWord = summary.strip().split(None, 2)[1].lower() |
1407 secondWord = summary.strip().split(None, 2)[1].lower() |
1393 if firstWord != 'class' and secondWord != 'class': |
1408 if firstWord != 'class' and secondWord != 'class': |
1394 self.__error(docstringContext.start() + lineNumber, 0, |
1409 self.__error(docstringContext.start() + lineNumber, 0, |