{"action":"created","issue":{"url":"https://api.github.com/repos/ambv/black/issues/379","repository_url":"https://api.github.com/repos/ambv/black","labels_url":"https://api.github.com/repos/ambv/black/issues/379/labels{/name}","comments_url":"https://api.github.com/repos/ambv/black/issues/379/comments","events_url":"https://api.github.com/repos/ambv/black/issues/379/events","html_url":"https://github.com/ambv/black/issues/379","id":336002723,"node_id":"MDU6SXNzdWUzMzYwMDI3MjM=","number":379,"title":"Reflows of inline comments can cause misalignment","user":{"login":"quodlibetor","id":277161,"node_id":"MDQ6VXNlcjI3NzE2MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/277161?v=4","gravatar_id":"","url":"https://api.github.com/users/quodlibetor","html_url":"https://github.com/quodlibetor","followers_url":"https://api.github.com/users/quodlibetor/followers","following_url":"https://api.github.com/users/quodlibetor/following{/other_user}","gists_url":"https://api.github.com/users/quodlibetor/gists{/gist_id}","starred_url":"https://api.github.com/users/quodlibetor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quodlibetor/subscriptions","organizations_url":"https://api.github.com/users/quodlibetor/orgs","repos_url":"https://api.github.com/users/quodlibetor/repos","events_url":"https://api.github.com/users/quodlibetor/events{/privacy}","received_events_url":"https://api.github.com/users/quodlibetor/received_events","type":"User","site_admin":false},"labels":[{"id":869137302,"node_id":"MDU6TGFiZWw4NjkxMzczMDI=","url":"https://api.github.com/repos/ambv/black/labels/comments","name":"comments","color":"ff00aa","default":false},{"id":867432796,"node_id":"MDU6TGFiZWw4Njc0MzI3OTY=","url":"https://api.github.com/repos/ambv/black/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-06-26T21:46:36Z","updated_at":"2018-12-24T09:44:39Z","closed_at":null,"author_association":"NONE","body":"Operating system: macOS\r\nPython version: 3.6\r\n*Black* version: 18.6b4\r\nDoes also happen on master: yes\r\n\r\n_edit_: moved original first example to end because it's reasonable behavior\r\n\r\nWith this (example 2), black moves everything down one so it is aligned incorrectly:\r\n\r\n```python\r\n# original\r\nrevert(\"!\" +\r\n       one(2) +         # extension\r\n       three(4) +       # length\r\n       one(flapping) +  # flapping info present\r\n       two(duration) +  # duration\r\n       two(0))\r\n```\r\n\r\nbecomes:\r\n\r\n```python\r\nrevert(\r\n    \"!\"\r\n    + one(2)\r\n    + three(4)  # extension\r\n    + one(flapping)  # length\r\n    + two(duration)  # flapping info present\r\n    + two(0)  # duration\r\n)\r\n```\r\n\r\nexample 1 (reasonable behavior, original text preserved):\r\n\r\n\r\n```python\r\n# original\r\na = [1,\r\n     2, # very important\r\n     3, # also important\r\n     4, # less important, but still worth reading\r\n     5] # this is just for the line length\r\n```\r\n\r\nBlack moves the last comment to a weird place, while handling most other lines correctly:\r\n\r\n```python\r\n# formatted\r\na = [\r\n    1,\r\n    2,  # very important\r\n    3,  # also important\r\n    4,  # less important, but still worth reading\r\n    5,\r\n]  # this is just for the line length\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ambv/black/issues/comments/449710601","html_url":"https://github.com/ambv/black/issues/379#issuecomment-449710601","issue_url":"https://api.github.com/repos/ambv/black/issues/379","id":449710601,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTcxMDYwMQ==","user":{"login":"arjennienhuis","id":15640868,"node_id":"MDQ6VXNlcjE1NjQwODY4","avatar_url":"https://avatars1.githubusercontent.com/u/15640868?v=4","gravatar_id":"","url":"https://api.github.com/users/arjennienhuis","html_url":"https://github.com/arjennienhuis","followers_url":"https://api.github.com/users/arjennienhuis/followers","following_url":"https://api.github.com/users/arjennienhuis/following{/other_user}","gists_url":"https://api.github.com/users/arjennienhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/arjennienhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arjennienhuis/subscriptions","organizations_url":"https://api.github.com/users/arjennienhuis/orgs","repos_url":"https://api.github.com/users/arjennienhuis/repos","events_url":"https://api.github.com/users/arjennienhuis/events{/privacy}","received_events_url":"https://api.github.com/users/arjennienhuis/received_events","type":"User","site_admin":false},"created_at":"2018-12-24T09:44:39Z","updated_at":"2018-12-24T09:44:39Z","author_association":"NONE","body":"I find this a inconvenient too:\r\n\r\n```\r\nports = [\r\n    80,\r\n    8080,  # for testing only\r\n    443,\r\n]\r\n```\r\n\r\nbecomes:\r\n\r\n```\r\nports = [80, 8080, 443]  # for testing only\r\n```\r\n\r\n"}}
{"actor":{"display_login":"arjennienhuis"}}