Changeset View
Changeset View
Standalone View
Standalone View
doc/python_api/sphinx_changelog_gen.py
| Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | for struct_id, struct_info in sorted(struct.items()): | ||||
| prop.default, # default | prop.default, # default | ||||
| prop.description, # descr | prop.description, # descr | ||||
| Ellipsis, # f_args | Ellipsis, # f_args | ||||
| Ellipsis, # f_arg_types | Ellipsis, # f_arg_types | ||||
| Ellipsis, # f_ret_types | Ellipsis, # f_ret_types | ||||
| ) | ) | ||||
| del props | del props | ||||
| # python props, tricky since we dont know much about them. | # python props, tricky since we don't know much about them. | ||||
| for prop_id, attr in struct_info.get_py_properties(): | for prop_id, attr in struct_info.get_py_properties(): | ||||
| dump_class[prop_id] = ( | dump_class[prop_id] = ( | ||||
| "prop_py", # basic_type | "prop_py", # basic_type | ||||
| Ellipsis, # name | Ellipsis, # name | ||||
| Ellipsis, # type | Ellipsis, # type | ||||
| Ellipsis, # range | Ellipsis, # range | ||||
| Ellipsis, # length | Ellipsis, # length | ||||
| ▲ Show 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | for mod_id, class_id, props_moved, props_new, props_old, func_args in api_changes: | ||||
| write_title("Added", "^") | write_title("Added", "^") | ||||
| for prop_id in props_new: | for prop_id in props_new: | ||||
| fw("* :class:`%s.%s.%s`\n" % (mod_id, class_name, prop_id)) | fw("* :class:`%s.%s.%s`\n" % (mod_id, class_name, prop_id)) | ||||
| fw("\n") | fw("\n") | ||||
| if props_old: | if props_old: | ||||
| write_title("Removed", "^") | write_title("Removed", "^") | ||||
| for prop_id in props_old: | for prop_id in props_old: | ||||
| fw("* **%s**\n" % prop_id) # cant link to remvoed docs | fw("* **%s**\n" % prop_id) # can't link to removed docs | ||||
| fw("\n") | fw("\n") | ||||
| if props_moved: | if props_moved: | ||||
| write_title("Renamed", "^") | write_title("Renamed", "^") | ||||
| for prop_id_old, prop_id in props_moved: | for prop_id_old, prop_id in props_moved: | ||||
| fw("* **%s** -> :class:`%s.%s.%s`\n" % (prop_id_old, mod_id, class_name, prop_id)) | fw("* **%s** -> :class:`%s.%s.%s`\n" % (prop_id_old, mod_id, class_name, prop_id)) | ||||
| fw("\n") | fw("\n") | ||||
| ▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | parser.add_argument( | ||||
| help="File to compare from (previous version)") | help="File to compare from (previous version)") | ||||
| parser.add_argument( | parser.add_argument( | ||||
| "--api_to", dest="api_to", metavar='FILE', | "--api_to", dest="api_to", metavar='FILE', | ||||
| help="File to compare from (current)") | help="File to compare from (current)") | ||||
| parser.add_argument( | parser.add_argument( | ||||
| "--api_out", dest="api_out", metavar='FILE', | "--api_out", dest="api_out", metavar='FILE', | ||||
| help="Output sphinx changelog") | help="Output sphinx changelog") | ||||
| args = parser.parse_args(argv) # In this example we wont use the args | args = parser.parse_args(argv) # In this example we won't use the args | ||||
| if not argv: | if not argv: | ||||
| print("No args given!") | print("No args given!") | ||||
| parser.print_help() | parser.print_help() | ||||
| return | return | ||||
| if args.dump: | if args.dump: | ||||
| api_dump() | api_dump() | ||||
| Show All 13 Lines | |||||