{"action":"created","comment":{"url":"https://api.github.com/repos/ros/ros_comm/pulls/comments/76010960","id":76010960,"diff_hunk":"@@ -1282,8 +1289,16 @@ def _optparse_topic_only(cmd, argv):\n     return rosgraph.names.script_resolve_name('rostopic', args[0])\n \n def _rostopic_cmd_type(argv):\n-    _rostopic_type(_optparse_topic_only('type', argv))\n-    \n+    args = argv[2:]\n+    from optparse import OptionParser\n+    parser = OptionParser(usage=\"usage: %prog type /topic_or_field\", prog=NAME)\n+    (options, args) = parser.parse_args(args)\n+    if len(args) == 0:\n+        parser.error(\"topic or field must be specified\")\n+    if len(args) > 1:\n+        parser.error(\"you may only specify one input topic or field\")","path":"tools/rostopic/src/rostopic/__init__.py","position":37,"original_position":37,"commit_id":"c941000df99461fd0b739539507e4e539fdca7e5","original_commit_id":"c941000df99461fd0b739539507e4e539fdca7e5","user":{"login":"wkentaro","id":4310419,"avatar_url":"https://avatars.githubusercontent.com/u/4310419?v=3","gravatar_id":"","url":"https://api.github.com/users/wkentaro","html_url":"https://github.com/wkentaro","followers_url":"https://api.github.com/users/wkentaro/followers","following_url":"https://api.github.com/users/wkentaro/following{/other_user}","gists_url":"https://api.github.com/users/wkentaro/gists{/gist_id}","starred_url":"https://api.github.com/users/wkentaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkentaro/subscriptions","organizations_url":"https://api.github.com/users/wkentaro/orgs","repos_url":"https://api.github.com/users/wkentaro/repos","events_url":"https://api.github.com/users/wkentaro/events{/privacy}","received_events_url":"https://api.github.com/users/wkentaro/received_events","type":"User","site_admin":false},"body":"I also prefer `argparse`, so i will use it.","created_at":"2016-08-24T08:06:31Z","updated_at":"2016-08-24T08:06:31Z","html_url":"https://github.com/ros/ros_comm/pull/860#discussion_r76010960","pull_request_url":"https://api.github.com/repos/ros/ros_comm/pulls/860","_links":{"self":{"href":"https://api.github.com/repos/ros/ros_comm/pulls/comments/76010960"},"html":{"href":"https://github.com/ros/ros_comm/pull/860#discussion_r76010960"},"pull_request":{"href":"https://api.github.com/repos/ros/ros_comm/pulls/860"}}},"pull_request":{"url":"https://api.github.com/repos/ros/ros_comm/pulls/860","id":80954272,"html_url":"https://github.com/ros/ros_comm/pull/860","diff_url":"https://github.com/ros/ros_comm/pull/860.diff","patch_url":"https://github.com/ros/ros_comm/pull/860.patch","issue_url":"https://api.github.com/repos/ros/ros_comm/issues/860","number":860,"state":"open","locked":false,"title":"[rostopic] Show topic field type with rostopic type","user":{"login":"wkentaro","id":4310419,"avatar_url":"https://avatars.githubusercontent.com/u/4310419?v=3","gravatar_id":"","url":"https://api.github.com/users/wkentaro","html_url":"https://github.com/wkentaro","followers_url":"https://api.github.com/users/wkentaro/followers","following_url":"https://api.github.com/users/wkentaro/following{/other_user}","gists_url":"https://api.github.com/users/wkentaro/gists{/gist_id}","starred_url":"https://api.github.com/users/wkentaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkentaro/subscriptions","organizations_url":"https://api.github.com/users/wkentaro/orgs","repos_url":"https://api.github.com/users/wkentaro/repos","events_url":"https://api.github.com/users/wkentaro/events{/privacy}","received_events_url":"https://api.github.com/users/wkentaro/received_events","type":"User","site_admin":false},"body":"For https://github.com/jsk-ros-pkg/jsk_visualization/issues/625#issuecomment-238793703\r\n\r\nAs shown below:\r\n\r\n```bash\r\n% rostopic type /raw_image_bgr/image_color/foo\r\nunknown topic type [/raw_image_bgr/image_color/foo]\r\n\r\n% rostopic type /raw_image_bgr/image_color/header\r\nsensor_msgs/Image header std_msgs/Header\r\n\r\n% rostopic type /raw_image_bgr/image_color/header/frame_id\r\nsensor_msgs/Image header/frame_id string\r\n\r\n% rostopic type /raw_image_bgr/image_color\r\nsensor_msgs/Image\r\n```\r\n\r\nThe current behavior is below:\r\n\r\n```bash\r\n% rostopic type /raw_image_bgr/image_color/foo\r\nunknown topic type [/raw_image_bgr/image_color/foo]\r\n\r\n% rostopic type /raw_image_bgr/image_color/header\r\nsensor_msgs/Image\r\n\r\n% rostopic type /raw_image_bgr/image_color\r\nsensor_msgs/Image\r\n```","created_at":"2016-08-11T13:08:45Z","updated_at":"2016-08-24T08:06:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d46eb13a300790df252b1ac2a05106e3e148791e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ros/ros_comm/pulls/860/commits","review_comments_url":"https://api.github.com/repos/ros/ros_comm/pulls/860/comments","review_comment_url":"https://api.github.com/repos/ros/ros_comm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros/ros_comm/issues/860/comments","statuses_url":"https://api.github.com/repos/ros/ros_comm/statuses/c941000df99461fd0b739539507e4e539fdca7e5","head":{"label":"wkentaro:rostopic-type-field","ref":"rostopic-type-field","sha":"c941000df99461fd0b739539507e4e539fdca7e5","user":{"login":"wkentaro","id":4310419,"avatar_url":"https://avatars.githubusercontent.com/u/4310419?v=3","gravatar_id":"","url":"https://api.github.com/users/wkentaro","html_url":"https://github.com/wkentaro","followers_url":"https://api.github.com/users/wkentaro/followers","following_url":"https://api.github.com/users/wkentaro/following{/other_user}","gists_url":"https://api.github.com/users/wkentaro/gists{/gist_id}","starred_url":"https://api.github.com/users/wkentaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkentaro/subscriptions","organizations_url":"https://api.github.com/users/wkentaro/orgs","repos_url":"https://api.github.com/users/wkentaro/repos","events_url":"https://api.github.com/users/wkentaro/events{/privacy}","received_events_url":"https://api.github.com/users/wkentaro/received_events","type":"User","site_admin":false},"repo":{"id":39161018,"name":"ros_comm","full_name":"wkentaro/ros_comm","owner":{"login":"wkentaro","id":4310419,"avatar_url":"https://avatars.githubusercontent.com/u/4310419?v=3","gravatar_id":"","url":"https://api.github.com/users/wkentaro","html_url":"https://github.com/wkentaro","followers_url":"https://api.github.com/users/wkentaro/followers","following_url":"https://api.github.com/users/wkentaro/following{/other_user}","gists_url":"https://api.github.com/users/wkentaro/gists{/gist_id}","starred_url":"https://api.github.com/users/wkentaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkentaro/subscriptions","organizations_url":"https://api.github.com/users/wkentaro/orgs","repos_url":"https://api.github.com/users/wkentaro/repos","events_url":"https://api.github.com/users/wkentaro/events{/privacy}","received_events_url":"https://api.github.com/users/wkentaro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wkentaro/ros_comm","description":"ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).","fork":true,"url":"https://api.github.com/repos/wkentaro/ros_comm","forks_url":"https://api.github.com/repos/wkentaro/ros_comm/forks","keys_url":"https://api.github.com/repos/wkentaro/ros_comm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wkentaro/ros_comm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wkentaro/ros_comm/teams","hooks_url":"https://api.github.com/repos/wkentaro/ros_comm/hooks","issue_events_url":"https://api.github.com/repos/wkentaro/ros_comm/issues/events{/number}","events_url":"https://api.github.com/repos/wkentaro/ros_comm/events","assignees_url":"https://api.github.com/repos/wkentaro/ros_comm/assignees{/user}","branches_url":"https://api.github.com/repos/wkentaro/ros_comm/branches{/branch}","tags_url":"https://api.github.com/repos/wkentaro/ros_comm/tags","blobs_url":"https://api.github.com/repos/wkentaro/ros_comm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wkentaro/ros_comm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wkentaro/ros_comm/git/refs{/sha}","trees_url":"https://api.github.com/repos/wkentaro/ros_comm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wkentaro/ros_comm/statuses/{sha}","languages_url":"https://api.github.com/repos/wkentaro/ros_comm/languages","stargazers_url":"https://api.github.com/repos/wkentaro/ros_comm/stargazers","contributors_url":"https://api.github.com/repos/wkentaro/ros_comm/contributors","subscribers_url":"https://api.github.com/repos/wkentaro/ros_comm/subscribers","subscription_url":"https://api.github.com/repos/wkentaro/ros_comm/subscription","commits_url":"https://api.github.com/repos/wkentaro/ros_comm/commits{/sha}","git_commits_url":"https://api.github.com/repos/wkentaro/ros_comm/git/commits{/sha}","comments_url":"https://api.github.com/repos/wkentaro/ros_comm/comments{/number}","issue_comment_url":"https://api.github.com/repos/wkentaro/ros_comm/issues/comments{/number}","contents_url":"https://api.github.com/repos/wkentaro/ros_comm/contents/{+path}","compare_url":"https://api.github.com/repos/wkentaro/ros_comm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wkentaro/ros_comm/merges","archive_url":"https://api.github.com/repos/wkentaro/ros_comm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wkentaro/ros_comm/downloads","issues_url":"https://api.github.com/repos/wkentaro/ros_comm/issues{/number}","pulls_url":"https://api.github.com/repos/wkentaro/ros_comm/pulls{/number}","milestones_url":"https://api.github.com/repos/wkentaro/ros_comm/milestones{/number}","notifications_url":"https://api.github.com/repos/wkentaro/ros_comm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wkentaro/ros_comm/labels{/name}","releases_url":"https://api.github.com/repos/wkentaro/ros_comm/releases{/id}","deployments_url":"https://api.github.com/repos/wkentaro/ros_comm/deployments","created_at":"2015-07-15T20:59:20Z","updated_at":"2015-07-15T20:59:23Z","pushed_at":"2016-08-24T07:57:47Z","git_url":"git://github.com/wkentaro/ros_comm.git","ssh_url":"git@github.com:wkentaro/ros_comm.git","clone_url":"https://github.com/wkentaro/ros_comm.git","svn_url":"https://github.com/wkentaro/ros_comm","homepage":"http://wiki.ros.org/ros_comm","size":10950,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"indigo-devel"}},"base":{"label":"ros:indigo-devel","ref":"indigo-devel","sha":"ea132076ae6741caeda5b933b78f9e64efe2426c","user":{"login":"ros","id":547448,"avatar_url":"https://avatars.githubusercontent.com/u/547448?v=3","gravatar_id":"","url":"https://api.github.com/users/ros","html_url":"https://github.com/ros","followers_url":"https://api.github.com/users/ros/followers","following_url":"https://api.github.com/users/ros/following{/other_user}","gists_url":"https://api.github.com/users/ros/gists{/gist_id}","starred_url":"https://api.github.com/users/ros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros/subscriptions","organizations_url":"https://api.github.com/users/ros/orgs","repos_url":"https://api.github.com/users/ros/repos","events_url":"https://api.github.com/users/ros/events{/privacy}","received_events_url":"https://api.github.com/users/ros/received_events","type":"Organization","site_admin":false},"repo":{"id":5474834,"name":"ros_comm","full_name":"ros/ros_comm","owner":{"login":"ros","id":547448,"avatar_url":"https://avatars.githubusercontent.com/u/547448?v=3","gravatar_id":"","url":"https://api.github.com/users/ros","html_url":"https://github.com/ros","followers_url":"https://api.github.com/users/ros/followers","following_url":"https://api.github.com/users/ros/following{/other_user}","gists_url":"https://api.github.com/users/ros/gists{/gist_id}","starred_url":"https://api.github.com/users/ros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros/subscriptions","organizations_url":"https://api.github.com/users/ros/orgs","repos_url":"https://api.github.com/users/ros/repos","events_url":"https://api.github.com/users/ros/events{/privacy}","received_events_url":"https://api.github.com/users/ros/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros/ros_comm","description":"ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).","fork":false,"url":"https://api.github.com/repos/ros/ros_comm","forks_url":"https://api.github.com/repos/ros/ros_comm/forks","keys_url":"https://api.github.com/repos/ros/ros_comm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros/ros_comm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros/ros_comm/teams","hooks_url":"https://api.github.com/repos/ros/ros_comm/hooks","issue_events_url":"https://api.github.com/repos/ros/ros_comm/issues/events{/number}","events_url":"https://api.github.com/repos/ros/ros_comm/events","assignees_url":"https://api.github.com/repos/ros/ros_comm/assignees{/user}","branches_url":"https://api.github.com/repos/ros/ros_comm/branches{/branch}","tags_url":"https://api.github.com/repos/ros/ros_comm/tags","blobs_url":"https://api.github.com/repos/ros/ros_comm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros/ros_comm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros/ros_comm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros/ros_comm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros/ros_comm/statuses/{sha}","languages_url":"https://api.github.com/repos/ros/ros_comm/languages","stargazers_url":"https://api.github.com/repos/ros/ros_comm/stargazers","contributors_url":"https://api.github.com/repos/ros/ros_comm/contributors","subscribers_url":"https://api.github.com/repos/ros/ros_comm/subscribers","subscription_url":"https://api.github.com/repos/ros/ros_comm/subscription","commits_url":"https://api.github.com/repos/ros/ros_comm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros/ros_comm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros/ros_comm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros/ros_comm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros/ros_comm/contents/{+path}","compare_url":"https://api.github.com/repos/ros/ros_comm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros/ros_comm/merges","archive_url":"https://api.github.com/repos/ros/ros_comm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros/ros_comm/downloads","issues_url":"https://api.github.com/repos/ros/ros_comm/issues{/number}","pulls_url":"https://api.github.com/repos/ros/ros_comm/pulls{/number}","milestones_url":"https://api.github.com/repos/ros/ros_comm/milestones{/number}","notifications_url":"https://api.github.com/repos/ros/ros_comm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros/ros_comm/labels{/name}","releases_url":"https://api.github.com/repos/ros/ros_comm/releases{/id}","deployments_url":"https://api.github.com/repos/ros/ros_comm/deployments","created_at":"2012-08-19T22:26:34Z","updated_at":"2016-08-22T15:27:13Z","pushed_at":"2016-08-23T20:42:33Z","git_url":"git://github.com/ros/ros_comm.git","ssh_url":"git@github.com:ros/ros_comm.git","clone_url":"https://github.com/ros/ros_comm.git","svn_url":"https://github.com/ros/ros_comm","homepage":"http://wiki.ros.org/ros_comm","size":14706,"stargazers_count":96,"watchers_count":96,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":234,"mirror_url":null,"open_issues_count":175,"forks":234,"open_issues":175,"watchers":96,"default_branch":"kinetic-devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ros/ros_comm/pulls/860"},"html":{"href":"https://github.com/ros/ros_comm/pull/860"},"issue":{"href":"https://api.github.com/repos/ros/ros_comm/issues/860"},"comments":{"href":"https://api.github.com/repos/ros/ros_comm/issues/860/comments"},"review_comments":{"href":"https://api.github.com/repos/ros/ros_comm/pulls/860/comments"},"review_comment":{"href":"https://api.github.com/repos/ros/ros_comm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros/ros_comm/pulls/860/commits"},"statuses":{"href":"https://api.github.com/repos/ros/ros_comm/statuses/c941000df99461fd0b739539507e4e539fdca7e5"}}}}
{"actor":{"display_login":"wkentaro"}}