{"action":"opened","issue":{"url":"https://api.github.com/repos/ambv/black/issues/576","repository_url":"https://api.github.com/repos/ambv/black","labels_url":"https://api.github.com/repos/ambv/black/issues/576/labels{/name}","comments_url":"https://api.github.com/repos/ambv/black/issues/576/comments","events_url":"https://api.github.com/repos/ambv/black/issues/576/events","html_url":"https://github.com/ambv/black/issues/576","id":371570443,"node_id":"MDU6SXNzdWUzNzE1NzA0NDM=","number":576,"title":"Trailing comments cause unnecessary optional parentheses","user":{"login":"deckar01","id":3108007,"node_id":"MDQ6VXNlcjMxMDgwMDc=","avatar_url":"https://avatars1.githubusercontent.com/u/3108007?v=4","gravatar_id":"","url":"https://api.github.com/users/deckar01","html_url":"https://github.com/deckar01","followers_url":"https://api.github.com/users/deckar01/followers","following_url":"https://api.github.com/users/deckar01/following{/other_user}","gists_url":"https://api.github.com/users/deckar01/gists{/gist_id}","starred_url":"https://api.github.com/users/deckar01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deckar01/subscriptions","organizations_url":"https://api.github.com/users/deckar01/orgs","repos_url":"https://api.github.com/users/deckar01/repos","events_url":"https://api.github.com/users/deckar01/events{/privacy}","received_events_url":"https://api.github.com/users/deckar01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-18T14:52:36Z","updated_at":"2018-10-18T14:52:36Z","closed_at":null,"author_association":"NONE","body":"Operating system: Ubuntu 18.04\r\nPython version: 3.6.6\r\n*Black* version: 18.9b0\r\nDoes also happen on master: Yes ([example](https://black.now.sh/?version=master&state=_Td6WFoAAATm1rRGAgAhARYAAAB0L-Wj4AGNAQpdAD2IimZxl1N_WlkOEznFeHcSXu8_XA3021O0vuVt_K6ldWu6rlv3qq_SsnRojNYej-JXPz8YLdom0rid6__kpPpxbjxFpG8FvONGycZnvluc0YQgVfY9h2-Bfow9GeO1pJok95J6wOcQexjcDybJ9Tm9WapkDUW2vE5mjQ250VRxMltJyEfYiGrkGmWj7puFXYpffhr6dyxOcWwk6y4hEr4kU6VJ02kyWC_8mOm1c-vqYdd-14SZTRQieh-SXClPVKQLQWOQGP0s1JM5TRebaYivUp1aHpFMZr5F1oAEEsQ1aqKKHWJQOI6v2DNwKnwPduHPl4cIPA8F_g1jYxos2Y_Ty9Pds4jE9V72AAAA5M-4Wh1aeF4AAaYCjgMAAB8KEHmxxGf7AgAAAAAEWVo=))\r\nRelated issues: #232\r\n\r\n## Reproduction steps\r\n\r\n1. Write a line of code\r\n2. Add a long comment at the end of the line of code that exceeds the maximum line length\r\n\r\n```py\r\nfoo = 'bar baz bing boo blah'  # This is a long comment that really shouldn't be at the end of a line in the first place, but black leaves it at the end of the line and uses it to decide if the actual expression needs parenthesis even though it doesn't and adding them has a very small chance of fixing the line length\r\n```\r\n\r\n## Actual behavior\r\n\r\nThe code to wrap with parenthesis and put an a separate line.\r\n\r\n```py\r\nfoo = (\r\n    \"bar baz bing boo blah\"\r\n)  # This is a long comment that really shouldn't be at the end of a line in the first place, but black leaves it at the end of the line and uses it to decide if the actual expression needs parenthesis even though it doesn't and adding them has a very small chance of fixing the line length\r\n```\r\n\r\n## Expected behavior\r\n\r\nNo parenthesis or wrapping. The length of the comment should not be included in the calculation that determines if the code should wrap.\r\n\r\n```py\r\nfoo = 'bar baz bing boo blah'  # This is a long comment that really shouldn't be at the end of a line in the first place, but black leaves it at the end of the line and uses it to decide if the actual expression needs parenthesis even though it doesn't and adding them has a very small chance of fixing the line length\r\n```"}}
{"actor":{"display_login":"deckar01"}}