{"action":"created","issue":{"url":"https://api.github.com/repos/Glavin001/atom-beautify/issues/856","repository_url":"https://api.github.com/repos/Glavin001/atom-beautify","labels_url":"https://api.github.com/repos/Glavin001/atom-beautify/issues/856/labels{/name}","comments_url":"https://api.github.com/repos/Glavin001/atom-beautify/issues/856/comments","events_url":"https://api.github.com/repos/Glavin001/atom-beautify/issues/856/events","html_url":"https://github.com/Glavin001/atom-beautify/pull/856","id":140816110,"number":856,"title":"Fix yapf style issue","user":{"login":"kdheepak89","id":1813121,"avatar_url":"https://avatars.githubusercontent.com/u/1813121?v=3","gravatar_id":"","url":"https://api.github.com/users/kdheepak89","html_url":"https://github.com/kdheepak89","followers_url":"https://api.github.com/users/kdheepak89/followers","following_url":"https://api.github.com/users/kdheepak89/following{/other_user}","gists_url":"https://api.github.com/users/kdheepak89/gists{/gist_id}","starred_url":"https://api.github.com/users/kdheepak89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdheepak89/subscriptions","organizations_url":"https://api.github.com/users/kdheepak89/orgs","repos_url":"https://api.github.com/users/kdheepak89/repos","events_url":"https://api.github.com/users/kdheepak89/events{/privacy}","received_events_url":"https://api.github.com/users/kdheepak89/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-14T22:36:59Z","updated_at":"2016-03-16T14:22:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Glavin001/atom-beautify/pulls/856","html_url":"https://github.com/Glavin001/atom-beautify/pull/856","diff_url":"https://github.com/Glavin001/atom-beautify/pull/856.diff","patch_url":"https://github.com/Glavin001/atom-beautify/pull/856.patch"},"body":"### What does this implement/fix? Explain your changes.\r\n\r\nYAPF configuration files were previously being ignored. This was because the `run` call to yapf was explicitly defining a `--style` flag.\r\n\r\nThe --style flag accepts different types of input. From their documentation - \"accepts one of the predefined styles (e.g., pep8 or google), a path to a configuration file that specifies the desired style, or a dictionary of key/value pairs.\"\r\n\r\nBy not explicitly specifying the --style flag, yapf will look for the following in order\r\n\r\n1. In the [style] section of a .style.yapf file in either the current directory or one of its parent directories.\r\n2. In the [yapf] secionf of a setup.cfg file in either the current directory or one of its parent directories.\r\n3. In the ~/.config/yapf/style file in your home directory.\r\n\r\nThis pull request removes the `--style=pep8` flag in the `run` call to yapf. This is not required, since yapf uses `pep8` by default\r\n\r\n### Does this close any currently open issues?\r\n\r\nThis closes #786 \r\n\r\n### Any other comments?\r\n\r\nA further improvement will be to have a field where the style can be entered as a dictionary.\r\n\r\n### Checklist\r\n\r\nCheck all those that are applicable and complete.\r\n\r\n- [X] Merged with latest `master` branch\r\n- [ ] Added examples for testing to [examples/ directory](examples/)\r\n- [ ] Travis CI passes (Mac support)\r\n- [ ] AppVeyor passes (Windows support)"},"comment":{"url":"https://api.github.com/repos/Glavin001/atom-beautify/issues/comments/197352381","html_url":"https://github.com/Glavin001/atom-beautify/pull/856#issuecomment-197352381","issue_url":"https://api.github.com/repos/Glavin001/atom-beautify/issues/856","id":197352381,"user":{"login":"ProgramFan","id":32396,"avatar_url":"https://avatars.githubusercontent.com/u/32396?v=3","gravatar_id":"","url":"https://api.github.com/users/ProgramFan","html_url":"https://github.com/ProgramFan","followers_url":"https://api.github.com/users/ProgramFan/followers","following_url":"https://api.github.com/users/ProgramFan/following{/other_user}","gists_url":"https://api.github.com/users/ProgramFan/gists{/gist_id}","starred_url":"https://api.github.com/users/ProgramFan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProgramFan/subscriptions","organizations_url":"https://api.github.com/users/ProgramFan/orgs","repos_url":"https://api.github.com/users/ProgramFan/repos","events_url":"https://api.github.com/users/ProgramFan/events{/privacy}","received_events_url":"https://api.github.com/users/ProgramFan/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T14:22:05Z","updated_at":"2016-03-16T14:22:05Z","body":"I agree. It makes sense to copy the style file to the temp dir. The problem to watch out is to make sure the two temp files get created under the same directory and to search the config file as least as possible (I guess search for a filename in a large directory can be slow thus cause possible lag)."}}