DocumentationTools/ModuleDocumentor.py

branch
6_0_x
changeset 4268
6f0af8933902
parent 4022
f5f42921717e
equal deleted inserted replaced
4265:9d69e24d0279 4268:6f0af8933902
275 'ClassList': classList, 275 'ClassList': classList,
276 'FunctionList': functionList, 276 'FunctionList': functionList,
277 }) 277 })
278 except TagError as e: 278 except TagError as e:
279 sys.stderr.write( 279 sys.stderr.write(
280 "Error processing {0}.\n".format(self.module.file))
281 sys.stderr.write(
280 "Error in tags of description of module {0}.\n".format( 282 "Error in tags of description of module {0}.\n".format(
281 self.module.name)) 283 self.module.name))
282 sys.stderr.write("{0}\n".format(e)) 284 sys.stderr.write("{0}\n".format(e))
283 return "" 285 return ""
284 286
424 'StaticMethodList': staticMethList, 426 'StaticMethodList': staticMethList,
425 'MethodDetails': 427 'MethodDetails':
426 classMethBodies + methBodies + staticMethBodies, 428 classMethBodies + methBodies + staticMethBodies,
427 }) 429 })
428 except TagError as e: 430 except TagError as e:
431 sys.stderr.write(
432 "Error processing {0}.\n".format(self.module.file))
429 sys.stderr.write( 433 sys.stderr.write(
430 "Error in tags of description of class {0}.\n".format( 434 "Error in tags of description of class {0}.\n".format(
431 className)) 435 className))
432 sys.stderr.write("{0}\n".format(e)) 436 sys.stderr.write("{0}\n".format(e))
433 clsBody = "" 437 clsBody = ""
507 'Params': 511 'Params':
508 ', '.join(obj.methods['__init__'].parameters[1:]), 512 ', '.join(obj.methods['__init__'].parameters[1:]),
509 }) 513 })
510 except TagError as e: 514 except TagError as e:
511 sys.stderr.write( 515 sys.stderr.write(
516 "Error processing {0}.\n".format(self.module.file))
517 sys.stderr.write(
512 "Error in tags of description of method {0}.{1}.\n".format( 518 "Error in tags of description of method {0}.{1}.\n".format(
513 className, '__init__')) 519 className, '__init__'))
514 sys.stderr.write("{0}\n".format(e)) 520 sys.stderr.write("{0}\n".format(e))
515 methBody = "" 521 methBody = ""
516 methBodies.append(methBody) 522 methBodies.append(methBody)
533 obj.methods[method].description), 539 obj.methods[method].description),
534 'Params': ', '.join(obj.methods[method].parameters[1:]), 540 'Params': ', '.join(obj.methods[method].parameters[1:]),
535 }) 541 })
536 except TagError as e: 542 except TagError as e:
537 sys.stderr.write( 543 sys.stderr.write(
544 "Error processing {0}.\n".format(self.module.file))
545 sys.stderr.write(
538 "Error in tags of description of method {0}.{1}.\n".format( 546 "Error in tags of description of method {0}.{1}.\n".format(
539 className, method)) 547 className, method))
540 sys.stderr.write("{0}\n".format(e)) 548 sys.stderr.write("{0}\n".format(e))
541 methBody = "" 549 methBody = ""
542 methBodies.append(methBody) 550 methBodies.append(methBody)
579 'FunctionsList': methList, 587 'FunctionsList': methList,
580 'FunctionsDetails': methBodies, 588 'FunctionsDetails': methBodies,
581 }) 589 })
582 except TagError as e: 590 except TagError as e:
583 sys.stderr.write( 591 sys.stderr.write(
592 "Error processing {0}.\n".format(self.module.file))
593 sys.stderr.write(
584 "Error in tags of description of Ruby module {0}.\n" 594 "Error in tags of description of Ruby module {0}.\n"
585 .format(rbModuleName)) 595 .format(rbModuleName))
586 sys.stderr.write("{0}\n".format(e)) 596 sys.stderr.write("{0}\n".format(e))
587 rbmBody = "" 597 rbmBody = ""
588 598
621 self.__formatDescription(_class.description), 631 self.__formatDescription(_class.description),
622 'MethodList': methList, 632 'MethodList': methList,
623 'MethodDetails': methBodies, 633 'MethodDetails': methBodies,
624 }) 634 })
625 except TagError as e: 635 except TagError as e:
636 sys.stderr.write(
637 "Error processing {0}.\n".format(self.module.file))
626 sys.stderr.write( 638 sys.stderr.write(
627 "Error in tags of description of class {0}.\n".format( 639 "Error in tags of description of class {0}.\n".format(
628 className)) 640 className))
629 sys.stderr.write("{0}\n".format(e)) 641 sys.stderr.write("{0}\n".format(e))
630 clsBody = "" 642 clsBody = ""
682 self.module.functions[funcName].description), 694 self.module.functions[funcName].description),
683 'Params': 695 'Params':
684 ', '.join(self.module.functions[funcName].parameters), 696 ', '.join(self.module.functions[funcName].parameters),
685 }) 697 })
686 except TagError as e: 698 except TagError as e:
699 sys.stderr.write(
700 "Error processing {0}.\n".format(self.module.file))
687 sys.stderr.write( 701 sys.stderr.write(
688 "Error in tags of description of function {0}.\n".format( 702 "Error in tags of description of function {0}.\n".format(
689 funcName)) 703 funcName))
690 sys.stderr.write("{0}\n".format(e)) 704 sys.stderr.write("{0}\n".format(e))
691 funcBody = "" 705 funcBody = ""

eric ide

mercurial