{"action":"created","comment":{"url":"https://api.github.com/repos/coala-analyzer/coala/pulls/comments/67997618","id":67997618,"diff_hunk":"@@ -74,3 +83,36 @@ def to_snakecase(string):\n     return re.sub(\"[A-Z]\",\n                   lambda match: \"_\" + match.group(0).lower(),\n                   string)\n+\n+\n+def to_spacecase(string):\n+   \"\"\"\n+   Converts the given string to space-case.\n+\n+   >>> to_spacecase('helloWorld')\n+   'Hello World'\n+   >>> to_spacecase('__Init__File__')\n+   'Init File'\n+   >>> to_spacecase('')\n+   ''\n+   >>> to_spacecase('Already Space Case')\n+   'Already Space Case'\n+\n+   :param string: The string to convert.","path":"coalib/bearlib/naming_conventions/__init__.py","position":null,"original_position":49,"commit_id":"f4abe5b6eb99ed40a1113d086dfd9f0a0f5eb0fa","original_commit_id":"ba409b1f6e0a08c191d1a05e5a06fddf5bf967ae","user":{"login":"gitmate-bot","id":15421488,"avatar_url":"https://avatars.githubusercontent.com/u/15421488?v=3","gravatar_id":"","url":"https://api.github.com/users/gitmate-bot","html_url":"https://github.com/gitmate-bot","followers_url":"https://api.github.com/users/gitmate-bot/followers","following_url":"https://api.github.com/users/gitmate-bot/following{/other_user}","gists_url":"https://api.github.com/users/gitmate-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/gitmate-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitmate-bot/subscriptions","organizations_url":"https://api.github.com/users/gitmate-bot/orgs","repos_url":"https://api.github.com/users/gitmate-bot/repos","events_url":"https://api.github.com/users/gitmate-bot/events{/privacy}","received_events_url":"https://api.github.com/users/gitmate-bot/received_events","type":"User","site_admin":false},"body":"The code does not comply to PEP8.\n\n*PEP8Bear, severity NORMAL, section `autopep8`.*\n\nThe issue can be fixed by applying the following patch:\n\n```diff\n--- a/coalib/bearlib/naming_conventions/__init__.py\n+++ b/coalib/bearlib/naming_conventions/__init__.py\n@@ -98,21 +98,21 @@\n    >>> to_spacecase('Already Space Case')\n    'Already Space Case'\n \n-   :param string: The string to convert.\n-   :return:       The space-cased string.\n-   \"\"\"\n-   string = re.sub(\"(_)\",\n-                lambda match: ' ',\n-                string)\n-   string = re.sub(\"^(\\s*)(.)\",\n-                   lambda match: match.group(2).upper(),\n-                   string)\n-   string = re.sub(\"(\\s*)$\",\n-                   lambda match: '',\n-                   string)\n-   string = re.sub(\"(?<=[^\\s])\\s+([^\\s])\",\n-                   lambda match: ' ' + match.group(1).upper(),\n-                   string)\n-   return re.sub(\"(?<=[^\\s])([A-Z])\",\n-                 lambda match: ' ' + match.group(1),\n-                 string)\n+    :param string: The string to convert.\n+    :return:       The space-cased string.\n+    \"\"\"\n+    string = re.sub(\"(_)\",\n+                    lambda match: ' ',\n+                    string)\n+    string = re.sub(\"^(\\s*)(.)\",\n+                    lambda match: match.group(2).upper(),\n+                    string)\n+    string = re.sub(\"(\\s*)$\",\n+                    lambda match: '',\n+                    string)\n+    string = re.sub(\"(?<=[^\\s])\\s+([^\\s])\",\n+                    lambda match: ' ' + match.group(1).upper(),\n+                    string)\n+    return re.sub(\"(?<=[^\\s])([A-Z])\",\n+                  lambda match: ' ' + match.group(1),\n+                  string)\n```","created_at":"2016-06-22T05:49:09Z","updated_at":"2016-06-22T05:49:09Z","html_url":"https://github.com/coala-analyzer/coala/pull/2381#discussion_r67997618","pull_request_url":"https://api.github.com/repos/coala-analyzer/coala/pulls/2381","_links":{"self":{"href":"https://api.github.com/repos/coala-analyzer/coala/pulls/comments/67997618"},"html":{"href":"https://github.com/coala-analyzer/coala/pull/2381#discussion_r67997618"},"pull_request":{"href":"https://api.github.com/repos/coala-analyzer/coala/pulls/2381"}}},"pull_request":{"url":"https://api.github.com/repos/coala-analyzer/coala/pulls/2381","id":74724828,"html_url":"https://github.com/coala-analyzer/coala/pull/2381","diff_url":"https://github.com/coala-analyzer/coala/pull/2381.diff","patch_url":"https://github.com/coala-analyzer/coala/pull/2381.patch","issue_url":"https://api.github.com/repos/coala-analyzer/coala/issues/2381","number":2381,"state":"open","locked":false,"title":"naming_convention: Add space-case algorithm","user":{"login":"Asnelchristian","id":10449314,"avatar_url":"https://avatars.githubusercontent.com/u/10449314?v=3","gravatar_id":"","url":"https://api.github.com/users/Asnelchristian","html_url":"https://github.com/Asnelchristian","followers_url":"https://api.github.com/users/Asnelchristian/followers","following_url":"https://api.github.com/users/Asnelchristian/following{/other_user}","gists_url":"https://api.github.com/users/Asnelchristian/gists{/gist_id}","starred_url":"https://api.github.com/users/Asnelchristian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Asnelchristian/subscriptions","organizations_url":"https://api.github.com/users/Asnelchristian/orgs","repos_url":"https://api.github.com/users/Asnelchristian/repos","events_url":"https://api.github.com/users/Asnelchristian/events{/privacy}","received_events_url":"https://api.github.com/users/Asnelchristian/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-22T05:10:47Z","updated_at":"2016-06-22T05:49:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afac3c6a28a85566c8e0f64d4605eaae2909995a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coala-analyzer/coala/pulls/2381/commits","review_comments_url":"https://api.github.com/repos/coala-analyzer/coala/pulls/2381/comments","review_comment_url":"https://api.github.com/repos/coala-analyzer/coala/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coala-analyzer/coala/issues/2381/comments","statuses_url":"https://api.github.com/repos/coala-analyzer/coala/statuses/f4abe5b6eb99ed40a1113d086dfd9f0a0f5eb0fa","head":{"label":"Asnelchristian:master","ref":"master","sha":"f4abe5b6eb99ed40a1113d086dfd9f0a0f5eb0fa","user":{"login":"Asnelchristian","id":10449314,"avatar_url":"https://avatars.githubusercontent.com/u/10449314?v=3","gravatar_id":"","url":"https://api.github.com/users/Asnelchristian","html_url":"https://github.com/Asnelchristian","followers_url":"https://api.github.com/users/Asnelchristian/followers","following_url":"https://api.github.com/users/Asnelchristian/following{/other_user}","gists_url":"https://api.github.com/users/Asnelchristian/gists{/gist_id}","starred_url":"https://api.github.com/users/Asnelchristian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Asnelchristian/subscriptions","organizations_url":"https://api.github.com/users/Asnelchristian/orgs","repos_url":"https://api.github.com/users/Asnelchristian/repos","events_url":"https://api.github.com/users/Asnelchristian/events{/privacy}","received_events_url":"https://api.github.com/users/Asnelchristian/received_events","type":"User","site_admin":false},"repo":{"id":59472985,"name":"coala","full_name":"Asnelchristian/coala","owner":{"login":"Asnelchristian","id":10449314,"avatar_url":"https://avatars.githubusercontent.com/u/10449314?v=3","gravatar_id":"","url":"https://api.github.com/users/Asnelchristian","html_url":"https://github.com/Asnelchristian","followers_url":"https://api.github.com/users/Asnelchristian/followers","following_url":"https://api.github.com/users/Asnelchristian/following{/other_user}","gists_url":"https://api.github.com/users/Asnelchristian/gists{/gist_id}","starred_url":"https://api.github.com/users/Asnelchristian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Asnelchristian/subscriptions","organizations_url":"https://api.github.com/users/Asnelchristian/orgs","repos_url":"https://api.github.com/users/Asnelchristian/repos","events_url":"https://api.github.com/users/Asnelchristian/events{/privacy}","received_events_url":"https://api.github.com/users/Asnelchristian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Asnelchristian/coala","description":"Easy to use code analysis framework/application - yes! For all languages!","fork":true,"url":"https://api.github.com/repos/Asnelchristian/coala","forks_url":"https://api.github.com/repos/Asnelchristian/coala/forks","keys_url":"https://api.github.com/repos/Asnelchristian/coala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Asnelchristian/coala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Asnelchristian/coala/teams","hooks_url":"https://api.github.com/repos/Asnelchristian/coala/hooks","issue_events_url":"https://api.github.com/repos/Asnelchristian/coala/issues/events{/number}","events_url":"https://api.github.com/repos/Asnelchristian/coala/events","assignees_url":"https://api.github.com/repos/Asnelchristian/coala/assignees{/user}","branches_url":"https://api.github.com/repos/Asnelchristian/coala/branches{/branch}","tags_url":"https://api.github.com/repos/Asnelchristian/coala/tags","blobs_url":"https://api.github.com/repos/Asnelchristian/coala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Asnelchristian/coala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Asnelchristian/coala/git/refs{/sha}","trees_url":"https://api.github.com/repos/Asnelchristian/coala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Asnelchristian/coala/statuses/{sha}","languages_url":"https://api.github.com/repos/Asnelchristian/coala/languages","stargazers_url":"https://api.github.com/repos/Asnelchristian/coala/stargazers","contributors_url":"https://api.github.com/repos/Asnelchristian/coala/contributors","subscribers_url":"https://api.github.com/repos/Asnelchristian/coala/subscribers","subscription_url":"https://api.github.com/repos/Asnelchristian/coala/subscription","commits_url":"https://api.github.com/repos/Asnelchristian/coala/commits{/sha}","git_commits_url":"https://api.github.com/repos/Asnelchristian/coala/git/commits{/sha}","comments_url":"https://api.github.com/repos/Asnelchristian/coala/comments{/number}","issue_comment_url":"https://api.github.com/repos/Asnelchristian/coala/issues/comments{/number}","contents_url":"https://api.github.com/repos/Asnelchristian/coala/contents/{+path}","compare_url":"https://api.github.com/repos/Asnelchristian/coala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Asnelchristian/coala/merges","archive_url":"https://api.github.com/repos/Asnelchristian/coala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Asnelchristian/coala/downloads","issues_url":"https://api.github.com/repos/Asnelchristian/coala/issues{/number}","pulls_url":"https://api.github.com/repos/Asnelchristian/coala/pulls{/number}","milestones_url":"https://api.github.com/repos/Asnelchristian/coala/milestones{/number}","notifications_url":"https://api.github.com/repos/Asnelchristian/coala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Asnelchristian/coala/labels{/name}","releases_url":"https://api.github.com/repos/Asnelchristian/coala/releases{/id}","deployments_url":"https://api.github.com/repos/Asnelchristian/coala/deployments","created_at":"2016-05-23T10:16:30Z","updated_at":"2016-05-23T10:16:31Z","pushed_at":"2016-06-22T05:47:57Z","git_url":"git://github.com/Asnelchristian/coala.git","ssh_url":"git@github.com:Asnelchristian/coala.git","clone_url":"https://github.com/Asnelchristian/coala.git","svn_url":"https://github.com/Asnelchristian/coala","homepage":"http://coala-analyzer.org/","size":9873,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"master"}},"base":{"label":"coala-analyzer:master","ref":"master","sha":"971523dfed56fa5e0fc25e2df600ade8d24b5657","user":{"login":"coala-analyzer","id":10620750,"avatar_url":"https://avatars.githubusercontent.com/u/10620750?v=3","gravatar_id":"","url":"https://api.github.com/users/coala-analyzer","html_url":"https://github.com/coala-analyzer","followers_url":"https://api.github.com/users/coala-analyzer/followers","following_url":"https://api.github.com/users/coala-analyzer/following{/other_user}","gists_url":"https://api.github.com/users/coala-analyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/coala-analyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coala-analyzer/subscriptions","organizations_url":"https://api.github.com/users/coala-analyzer/orgs","repos_url":"https://api.github.com/users/coala-analyzer/repos","events_url":"https://api.github.com/users/coala-analyzer/events{/privacy}","received_events_url":"https://api.github.com/users/coala-analyzer/received_events","type":"Organization","site_admin":false},"repo":{"id":19816973,"name":"coala","full_name":"coala-analyzer/coala","owner":{"login":"coala-analyzer","id":10620750,"avatar_url":"https://avatars.githubusercontent.com/u/10620750?v=3","gravatar_id":"","url":"https://api.github.com/users/coala-analyzer","html_url":"https://github.com/coala-analyzer","followers_url":"https://api.github.com/users/coala-analyzer/followers","following_url":"https://api.github.com/users/coala-analyzer/following{/other_user}","gists_url":"https://api.github.com/users/coala-analyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/coala-analyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coala-analyzer/subscriptions","organizations_url":"https://api.github.com/users/coala-analyzer/orgs","repos_url":"https://api.github.com/users/coala-analyzer/repos","events_url":"https://api.github.com/users/coala-analyzer/events{/privacy}","received_events_url":"https://api.github.com/users/coala-analyzer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coala-analyzer/coala","description":"Easy to use code analysis framework/application - yes! For all languages!","fork":false,"url":"https://api.github.com/repos/coala-analyzer/coala","forks_url":"https://api.github.com/repos/coala-analyzer/coala/forks","keys_url":"https://api.github.com/repos/coala-analyzer/coala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coala-analyzer/coala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coala-analyzer/coala/teams","hooks_url":"https://api.github.com/repos/coala-analyzer/coala/hooks","issue_events_url":"https://api.github.com/repos/coala-analyzer/coala/issues/events{/number}","events_url":"https://api.github.com/repos/coala-analyzer/coala/events","assignees_url":"https://api.github.com/repos/coala-analyzer/coala/assignees{/user}","branches_url":"https://api.github.com/repos/coala-analyzer/coala/branches{/branch}","tags_url":"https://api.github.com/repos/coala-analyzer/coala/tags","blobs_url":"https://api.github.com/repos/coala-analyzer/coala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coala-analyzer/coala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coala-analyzer/coala/git/refs{/sha}","trees_url":"https://api.github.com/repos/coala-analyzer/coala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coala-analyzer/coala/statuses/{sha}","languages_url":"https://api.github.com/repos/coala-analyzer/coala/languages","stargazers_url":"https://api.github.com/repos/coala-analyzer/coala/stargazers","contributors_url":"https://api.github.com/repos/coala-analyzer/coala/contributors","subscribers_url":"https://api.github.com/repos/coala-analyzer/coala/subscribers","subscription_url":"https://api.github.com/repos/coala-analyzer/coala/subscription","commits_url":"https://api.github.com/repos/coala-analyzer/coala/commits{/sha}","git_commits_url":"https://api.github.com/repos/coala-analyzer/coala/git/commits{/sha}","comments_url":"https://api.github.com/repos/coala-analyzer/coala/comments{/number}","issue_comment_url":"https://api.github.com/repos/coala-analyzer/coala/issues/comments{/number}","contents_url":"https://api.github.com/repos/coala-analyzer/coala/contents/{+path}","compare_url":"https://api.github.com/repos/coala-analyzer/coala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coala-analyzer/coala/merges","archive_url":"https://api.github.com/repos/coala-analyzer/coala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coala-analyzer/coala/downloads","issues_url":"https://api.github.com/repos/coala-analyzer/coala/issues{/number}","pulls_url":"https://api.github.com/repos/coala-analyzer/coala/pulls{/number}","milestones_url":"https://api.github.com/repos/coala-analyzer/coala/milestones{/number}","notifications_url":"https://api.github.com/repos/coala-analyzer/coala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coala-analyzer/coala/labels{/name}","releases_url":"https://api.github.com/repos/coala-analyzer/coala/releases{/id}","deployments_url":"https://api.github.com/repos/coala-analyzer/coala/deployments","created_at":"2014-05-15T11:35:34Z","updated_at":"2016-06-21T17:57:01Z","pushed_at":"2016-06-22T05:47:58Z","git_url":"git://github.com/coala-analyzer/coala.git","ssh_url":"git@github.com:coala-analyzer/coala.git","clone_url":"https://github.com/coala-analyzer/coala.git","svn_url":"https://github.com/coala-analyzer/coala","homepage":"http://coala-analyzer.org/","size":11955,"stargazers_count":233,"watchers_count":233,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":145,"mirror_url":null,"open_issues_count":203,"forks":145,"open_issues":203,"watchers":233,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coala-analyzer/coala/pulls/2381"},"html":{"href":"https://github.com/coala-analyzer/coala/pull/2381"},"issue":{"href":"https://api.github.com/repos/coala-analyzer/coala/issues/2381"},"comments":{"href":"https://api.github.com/repos/coala-analyzer/coala/issues/2381/comments"},"review_comments":{"href":"https://api.github.com/repos/coala-analyzer/coala/pulls/2381/comments"},"review_comment":{"href":"https://api.github.com/repos/coala-analyzer/coala/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coala-analyzer/coala/pulls/2381/commits"},"statuses":{"href":"https://api.github.com/repos/coala-analyzer/coala/statuses/f4abe5b6eb99ed40a1113d086dfd9f0a0f5eb0fa"}}}}
{"actor":{"display_login":"gitmate-bot"}}