7988:c4c17121eff8 | 7989:a21d673a8f99 |
---|---|
139 <tr> | 139 <tr> |
140 <td><a href="#DocStyleChecker.__checkEricSummary">__checkEricSummary</a></td> | 140 <td><a href="#DocStyleChecker.__checkEricSummary">__checkEricSummary</a></td> |
141 <td>Private method to check, that method docstring summaries start with specific words.</td> | 141 <td>Private method to check, that method docstring summaries start with specific words.</td> |
142 </tr> | 142 </tr> |
143 <tr> | 143 <tr> |
144 <td><a href="#DocStyleChecker.__checkEricYield">__checkEricYield</a></td> | |
145 <td>Private method to check, that docstrings contain an @yield line if they return anything and don't otherwise.</td> | |
146 </tr> | |
147 <tr> | |
144 <td><a href="#DocStyleChecker.__checkFunctionDocstring">__checkFunctionDocstring</a></td> | 148 <td><a href="#DocStyleChecker.__checkFunctionDocstring">__checkFunctionDocstring</a></td> |
145 <td>Private method to check, that all public functions and methods have a docstring.</td> | 149 <td>Private method to check, that all public functions and methods have a docstring.</td> |
146 </tr> | 150 </tr> |
147 <tr> | 151 <tr> |
148 <td><a href="#DocStyleChecker.__checkImperativeMood">__checkImperativeMood</a></td> | 152 <td><a href="#DocStyleChecker.__checkImperativeMood">__checkImperativeMood</a></td> |
609 <dt><i>context</i></dt> | 613 <dt><i>context</i></dt> |
610 <dd> | 614 <dd> |
611 context of the docstring (DocStyleContext) | 615 context of the docstring (DocStyleContext) |
612 </dd> | 616 </dd> |
613 </dl> | 617 </dl> |
618 <a NAME="DocStyleChecker.__checkEricYield" ID="DocStyleChecker.__checkEricYield"></a> | |
619 <h4>DocStyleChecker.__checkEricYield</h4> | |
620 <b>__checkEricYield</b>(<i>docstringContext, context</i>) | |
621 | |
622 <p> | |
623 Private method to check, that docstrings contain an @yield line | |
624 if they return anything and don't otherwise. | |
625 </p> | |
626 <dl> | |
627 | |
628 <dt><i>docstringContext</i></dt> | |
629 <dd> | |
630 docstring context (DocStyleContext) | |
631 </dd> | |
632 <dt><i>context</i></dt> | |
633 <dd> | |
634 context of the docstring (DocStyleContext) | |
635 </dd> | |
636 </dl> | |
614 <a NAME="DocStyleChecker.__checkFunctionDocstring" ID="DocStyleChecker.__checkFunctionDocstring"></a> | 637 <a NAME="DocStyleChecker.__checkFunctionDocstring" ID="DocStyleChecker.__checkFunctionDocstring"></a> |
615 <h4>DocStyleChecker.__checkFunctionDocstring</h4> | 638 <h4>DocStyleChecker.__checkFunctionDocstring</h4> |
616 <b>__checkFunctionDocstring</b>(<i>docstringContext, context</i>) | 639 <b>__checkFunctionDocstring</b>(<i>docstringContext, context</i>) |
617 | 640 |
618 <p> | 641 <p> |
836 <dd> | 859 <dd> |
837 AST node to extract arguments names from | 860 AST node to extract arguments names from |
838 </dd> | 861 </dd> |
839 </dl> | 862 </dl> |
840 <dl> | 863 <dl> |
841 <dt>Returns:</dt> | 864 <dt>Return:</dt> |
842 <dd> | 865 <dd> |
843 tuple of two list of argument names, one for arguments | 866 tuple of two list of argument names, one for arguments |
844 and one for keyword arguments (tuple of list of string) | 867 and one for keyword arguments (tuple of list of string) |
845 </dd> | 868 </dd> |
846 </dl> | 869 </dl> |
857 <dd> | 880 <dd> |
858 docstring context (DocStyleContext) | 881 docstring context (DocStyleContext) |
859 </dd> | 882 </dd> |
860 </dl> | 883 </dl> |
861 <dl> | 884 <dl> |
862 <dt>Returns:</dt> | 885 <dt>Return:</dt> |
863 <dd> | 886 <dd> |
864 summary line (string) and the line it was found on (integer) | 887 summary line (string) and the line it was found on (integer) |
865 </dd> | 888 </dd> |
866 </dl> | 889 </dl> |
867 <a NAME="DocStyleChecker.__getSummaryLines" ID="DocStyleChecker.__getSummaryLines"></a> | 890 <a NAME="DocStyleChecker.__getSummaryLines" ID="DocStyleChecker.__getSummaryLines"></a> |
877 <dd> | 900 <dd> |
878 docstring context (DocStyleContext) | 901 docstring context (DocStyleContext) |
879 </dd> | 902 </dd> |
880 </dl> | 903 </dl> |
881 <dl> | 904 <dl> |
882 <dt>Returns:</dt> | 905 <dt>Return:</dt> |
883 <dd> | 906 <dd> |
884 summary lines (list of string) and the line it was found on | 907 summary lines (list of string) and the line it was found on |
885 (integer) | 908 (integer) |
886 </dd> | 909 </dd> |
887 </dl> | 910 </dl> |
898 <dd> | 921 <dd> |
899 message code to check for (string) | 922 message code to check for (string) |
900 </dd> | 923 </dd> |
901 </dl> | 924 </dl> |
902 <dl> | 925 <dl> |
903 <dt>Returns:</dt> | 926 <dt>Return:</dt> |
904 <dd> | 927 <dd> |
905 flag indicating to ignore the given code (boolean) | 928 flag indicating to ignore the given code (boolean) |
906 </dd> | 929 </dd> |
907 </dl> | 930 </dl> |
908 <a NAME="DocStyleChecker.__parseClasses" ID="DocStyleChecker.__parseClasses"></a> | 931 <a NAME="DocStyleChecker.__parseClasses" ID="DocStyleChecker.__parseClasses"></a> |
911 | 934 |
912 <p> | 935 <p> |
913 Private method to extract top-level classes. | 936 Private method to extract top-level classes. |
914 </p> | 937 </p> |
915 <dl> | 938 <dl> |
916 <dt>Returns:</dt> | 939 <dt>Return:</dt> |
917 <dd> | 940 <dd> |
918 extracted class contexts (list of DocStyleContext) | 941 extracted class contexts (list of DocStyleContext) |
919 </dd> | 942 </dd> |
920 </dl> | 943 </dl> |
921 <a NAME="DocStyleChecker.__parseContexts" ID="DocStyleChecker.__parseContexts"></a> | 944 <a NAME="DocStyleChecker.__parseContexts" ID="DocStyleChecker.__parseContexts"></a> |
931 <dd> | 954 <dd> |
932 kind of context to extract (string) | 955 kind of context to extract (string) |
933 </dd> | 956 </dd> |
934 </dl> | 957 </dl> |
935 <dl> | 958 <dl> |
936 <dt>Returns:</dt> | 959 <dt>Return:</dt> |
937 <dd> | 960 <dd> |
938 requested contexts (list of DocStyleContext) | 961 requested contexts (list of DocStyleContext) |
939 </dd> | 962 </dd> |
940 </dl> | 963 </dl> |
941 <a NAME="DocStyleChecker.__parseDocstring" ID="DocStyleChecker.__parseDocstring"></a> | 964 <a NAME="DocStyleChecker.__parseDocstring" ID="DocStyleChecker.__parseDocstring"></a> |
955 <dd> | 978 <dd> |
956 string denoting what is being parsed (string) | 979 string denoting what is being parsed (string) |
957 </dd> | 980 </dd> |
958 </dl> | 981 </dl> |
959 <dl> | 982 <dl> |
960 <dt>Returns:</dt> | 983 <dt>Return:</dt> |
961 <dd> | 984 <dd> |
962 context of extracted docstring (DocStyleContext) | 985 context of extracted docstring (DocStyleContext) |
963 </dd> | 986 </dd> |
964 </dl> | 987 </dl> |
965 <a NAME="DocStyleChecker.__parseFunctions" ID="DocStyleChecker.__parseFunctions"></a> | 988 <a NAME="DocStyleChecker.__parseFunctions" ID="DocStyleChecker.__parseFunctions"></a> |
968 | 991 |
969 <p> | 992 <p> |
970 Private method to extract top-level functions. | 993 Private method to extract top-level functions. |
971 </p> | 994 </p> |
972 <dl> | 995 <dl> |
973 <dt>Returns:</dt> | 996 <dt>Return:</dt> |
974 <dd> | 997 <dd> |
975 extracted function contexts (list of DocStyleContext) | 998 extracted function contexts (list of DocStyleContext) |
976 </dd> | 999 </dd> |
977 </dl> | 1000 </dl> |
978 <a NAME="DocStyleChecker.__parseMethods" ID="DocStyleChecker.__parseMethods"></a> | 1001 <a NAME="DocStyleChecker.__parseMethods" ID="DocStyleChecker.__parseMethods"></a> |
981 | 1004 |
982 <p> | 1005 <p> |
983 Private method to extract methods of all classes. | 1006 Private method to extract methods of all classes. |
984 </p> | 1007 </p> |
985 <dl> | 1008 <dl> |
986 <dt>Returns:</dt> | 1009 <dt>Return:</dt> |
987 <dd> | 1010 <dd> |
988 extracted method contexts (list of DocStyleContext) | 1011 extracted method contexts (list of DocStyleContext) |
989 </dd> | 1012 </dd> |
990 </dl> | 1013 </dl> |
991 <a NAME="DocStyleChecker.__parseModuleDocstring" ID="DocStyleChecker.__parseModuleDocstring"></a> | 1014 <a NAME="DocStyleChecker.__parseModuleDocstring" ID="DocStyleChecker.__parseModuleDocstring"></a> |
1001 <dd> | 1024 <dd> |
1002 source to parse (list of string) | 1025 source to parse (list of string) |
1003 </dd> | 1026 </dd> |
1004 </dl> | 1027 </dl> |
1005 <dl> | 1028 <dl> |
1006 <dt>Returns:</dt> | 1029 <dt>Return:</dt> |
1007 <dd> | 1030 <dd> |
1008 context of extracted docstring (DocStyleContext) | 1031 context of extracted docstring (DocStyleContext) |
1009 </dd> | 1032 </dd> |
1010 </dl> | 1033 </dl> |
1011 <a NAME="DocStyleChecker.__parseTopLevel" ID="DocStyleChecker.__parseTopLevel"></a> | 1034 <a NAME="DocStyleChecker.__parseTopLevel" ID="DocStyleChecker.__parseTopLevel"></a> |
1021 <dd> | 1044 <dd> |
1022 keyword signaling what to extract (string) | 1045 keyword signaling what to extract (string) |
1023 </dd> | 1046 </dd> |
1024 </dl> | 1047 </dl> |
1025 <dl> | 1048 <dl> |
1026 <dt>Returns:</dt> | 1049 <dt>Return:</dt> |
1027 <dd> | 1050 <dd> |
1028 extracted function or class contexts (list of DocStyleContext) | 1051 extracted function or class contexts (list of DocStyleContext) |
1029 </dd> | 1052 </dd> |
1030 </dl> | 1053 </dl> |
1031 <a NAME="DocStyleChecker.__readline" ID="DocStyleChecker.__readline"></a> | 1054 <a NAME="DocStyleChecker.__readline" ID="DocStyleChecker.__readline"></a> |
1034 | 1057 |
1035 <p> | 1058 <p> |
1036 Private method to get the next line from the source. | 1059 Private method to get the next line from the source. |
1037 </p> | 1060 </p> |
1038 <dl> | 1061 <dl> |
1039 <dt>Returns:</dt> | 1062 <dt>Return:</dt> |
1040 <dd> | 1063 <dd> |
1041 next line of source (string) | 1064 next line of source (string) |
1042 </dd> | 1065 </dd> |
1043 </dl> | 1066 </dl> |
1044 <a NAME="DocStyleChecker.__reportInvalidSyntax" ID="DocStyleChecker.__reportInvalidSyntax"></a> | 1067 <a NAME="DocStyleChecker.__reportInvalidSyntax" ID="DocStyleChecker.__reportInvalidSyntax"></a> |
1068 <dd> | 1091 <dd> |
1069 token generator | 1092 token generator |
1070 </dd> | 1093 </dd> |
1071 </dl> | 1094 </dl> |
1072 <dl> | 1095 <dl> |
1073 <dt>Returns:</dt> | 1096 <dt>Return:</dt> |
1074 <dd> | 1097 <dd> |
1075 last token of the indented block | 1098 last token of the indented block |
1076 </dd> | 1099 </dd> |
1077 </dl> | 1100 </dl> |
1078 <a NAME="DocStyleChecker.run" ID="DocStyleChecker.run"></a> | 1101 <a NAME="DocStyleChecker.run" ID="DocStyleChecker.run"></a> |
1179 | 1202 |
1180 <p> | 1203 <p> |
1181 Public method to get the context type. | 1204 Public method to get the context type. |
1182 </p> | 1205 </p> |
1183 <dl> | 1206 <dl> |
1184 <dt>Returns:</dt> | 1207 <dt>Return:</dt> |
1185 <dd> | 1208 <dd> |
1186 context type (string) | 1209 context type (string) |
1187 </dd> | 1210 </dd> |
1188 </dl> | 1211 </dl> |
1189 <a NAME="DocStyleContext.end" ID="DocStyleContext.end"></a> | 1212 <a NAME="DocStyleContext.end" ID="DocStyleContext.end"></a> |
1192 | 1215 |
1193 <p> | 1216 <p> |
1194 Public method to get the end line number. | 1217 Public method to get the end line number. |
1195 </p> | 1218 </p> |
1196 <dl> | 1219 <dl> |
1197 <dt>Returns:</dt> | 1220 <dt>Return:</dt> |
1198 <dd> | 1221 <dd> |
1199 end line number (integer) | 1222 end line number (integer) |
1200 </dd> | 1223 </dd> |
1201 </dl> | 1224 </dl> |
1202 <a NAME="DocStyleContext.indent" ID="DocStyleContext.indent"></a> | 1225 <a NAME="DocStyleContext.indent" ID="DocStyleContext.indent"></a> |
1205 | 1228 |
1206 <p> | 1229 <p> |
1207 Public method to get the indentation of the first line. | 1230 Public method to get the indentation of the first line. |
1208 </p> | 1231 </p> |
1209 <dl> | 1232 <dl> |
1210 <dt>Returns:</dt> | 1233 <dt>Return:</dt> |
1211 <dd> | 1234 <dd> |
1212 indentation string (string) | 1235 indentation string (string) |
1213 </dd> | 1236 </dd> |
1214 </dl> | 1237 </dl> |
1215 <a NAME="DocStyleContext.setSpecial" ID="DocStyleContext.setSpecial"></a> | 1238 <a NAME="DocStyleContext.setSpecial" ID="DocStyleContext.setSpecial"></a> |
1232 | 1255 |
1233 <p> | 1256 <p> |
1234 Public method to get the source. | 1257 Public method to get the source. |
1235 </p> | 1258 </p> |
1236 <dl> | 1259 <dl> |
1237 <dt>Returns:</dt> | 1260 <dt>Return:</dt> |
1238 <dd> | 1261 <dd> |
1239 source (list of string) | 1262 source (list of string) |
1240 </dd> | 1263 </dd> |
1241 </dl> | 1264 </dl> |
1242 <a NAME="DocStyleContext.special" ID="DocStyleContext.special"></a> | 1265 <a NAME="DocStyleContext.special" ID="DocStyleContext.special"></a> |
1245 | 1268 |
1246 <p> | 1269 <p> |
1247 Public method to get the special context attribute string. | 1270 Public method to get the special context attribute string. |
1248 </p> | 1271 </p> |
1249 <dl> | 1272 <dl> |
1250 <dt>Returns:</dt> | 1273 <dt>Return:</dt> |
1251 <dd> | 1274 <dd> |
1252 attribute string | 1275 attribute string |
1253 </dd> | 1276 </dd> |
1254 </dl> | 1277 </dl> |
1255 <dl> | 1278 <dl> |
1264 | 1287 |
1265 <p> | 1288 <p> |
1266 Public method to get the joined source lines. | 1289 Public method to get the joined source lines. |
1267 </p> | 1290 </p> |
1268 <dl> | 1291 <dl> |
1269 <dt>Returns:</dt> | 1292 <dt>Return:</dt> |
1270 <dd> | 1293 <dd> |
1271 source (string) | 1294 source (string) |
1272 </dd> | 1295 </dd> |
1273 </dl> | 1296 </dl> |
1274 <a NAME="DocStyleContext.start" ID="DocStyleContext.start"></a> | 1297 <a NAME="DocStyleContext.start" ID="DocStyleContext.start"></a> |
1277 | 1300 |
1278 <p> | 1301 <p> |
1279 Public method to get the start line number. | 1302 Public method to get the start line number. |
1280 </p> | 1303 </p> |
1281 <dl> | 1304 <dl> |
1282 <dt>Returns:</dt> | 1305 <dt>Return:</dt> |
1283 <dd> | 1306 <dd> |
1284 start line number (integer) | 1307 start line number (integer) |
1285 </dd> | 1308 </dd> |
1286 </dl> | 1309 </dl> |
1287 <div align="right"><a href="#top">Up</a></div> | 1310 <div align="right"><a href="#top">Up</a></div> |