{"action":"created","comment":{"url":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls/comments/28991615","id":28991615,"diff_hunk":"@@ -112,7 +113,7 @@ class PagSeguro(object):\n     NONE = 3\n \n     def __init__(self, email, token, data=None, config=None):\n-        self.config = config or Config()\n+        self.config = isinstance(config, AbstractConfig) or Config()","path":"pagseguro/__init__.py","position":13,"original_position":13,"commit_id":"d8cdace179dcd1b18a5d3c3a5f2c140e71b034e7","original_commit_id":"d8cdace179dcd1b18a5d3c3a5f2c140e71b034e7","user":{"login":"rochacbruno","id":458654,"avatar_url":"https://avatars.githubusercontent.com/u/458654?v=3","gravatar_id":"","url":"https://api.github.com/users/rochacbruno","html_url":"https://github.com/rochacbruno","followers_url":"https://api.github.com/users/rochacbruno/followers","following_url":"https://api.github.com/users/rochacbruno/following{/other_user}","gists_url":"https://api.github.com/users/rochacbruno/gists{/gist_id}","starred_url":"https://api.github.com/users/rochacbruno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochacbruno/subscriptions","organizations_url":"https://api.github.com/users/rochacbruno/orgs","repos_url":"https://api.github.com/users/rochacbruno/repos","events_url":"https://api.github.com/users/rochacbruno/events{/privacy}","received_events_url":"https://api.github.com/users/rochacbruno/received_events","type":"User","site_admin":false},"body":"That line will attributte \"True\" to self.config if it is an instance of AbstractConfig, and also it silence errors, I prefer\r\n\r\n```python\r\ndef __init__(self, email, token, data=None, config=None):\r\n    self.config = config or Config()\r\n    assert isinstance(self.config, AbstractConfig), \"Config should be instance of AbstractConfig\"\r\n```\r\n","created_at":"2015-04-23T18:49:32Z","updated_at":"2015-04-23T18:49:32Z","html_url":"https://github.com/rochacbruno/python-pagseguro/pull/26#discussion_r28991615","pull_request_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls/comments/28991615"},"html":{"href":"https://github.com/rochacbruno/python-pagseguro/pull/26#discussion_r28991615"},"pull_request":{"href":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls/26","id":33979886,"html_url":"https://github.com/rochacbruno/python-pagseguro/pull/26","diff_url":"https://github.com/rochacbruno/python-pagseguro/pull/26.diff","patch_url":"https://github.com/rochacbruno/python-pagseguro/pull/26.patch","issue_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/issues/26","number":26,"state":"open","locked":false,"title":"Ensure config object is a valid AbstractConfig instance","user":{"login":"arthurbarros","id":1091270,"avatar_url":"https://avatars.githubusercontent.com/u/1091270?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurbarros","html_url":"https://github.com/arthurbarros","followers_url":"https://api.github.com/users/arthurbarros/followers","following_url":"https://api.github.com/users/arthurbarros/following{/other_user}","gists_url":"https://api.github.com/users/arthurbarros/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurbarros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurbarros/subscriptions","organizations_url":"https://api.github.com/users/arthurbarros/orgs","repos_url":"https://api.github.com/users/arthurbarros/repos","events_url":"https://api.github.com/users/arthurbarros/events{/privacy}","received_events_url":"https://api.github.com/users/arthurbarros/received_events","type":"User","site_admin":false},"body":"WIth this, any given config object passed to `PagSeguro(config=my_config)` have the minimun properties.","created_at":"2015-04-23T17:52:56Z","updated_at":"2015-04-23T18:49:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81bceac59ed424d1d7c94d78017cacc60a52fadc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls/26/commits","review_comments_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls/26/comments","review_comment_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/issues/26/comments","statuses_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/statuses/d8cdace179dcd1b18a5d3c3a5f2c140e71b034e7","head":{"label":"arthurbarros:fix-sandbox","ref":"fix-sandbox","sha":"d8cdace179dcd1b18a5d3c3a5f2c140e71b034e7","user":{"login":"arthurbarros","id":1091270,"avatar_url":"https://avatars.githubusercontent.com/u/1091270?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurbarros","html_url":"https://github.com/arthurbarros","followers_url":"https://api.github.com/users/arthurbarros/followers","following_url":"https://api.github.com/users/arthurbarros/following{/other_user}","gists_url":"https://api.github.com/users/arthurbarros/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurbarros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurbarros/subscriptions","organizations_url":"https://api.github.com/users/arthurbarros/orgs","repos_url":"https://api.github.com/users/arthurbarros/repos","events_url":"https://api.github.com/users/arthurbarros/events{/privacy}","received_events_url":"https://api.github.com/users/arthurbarros/received_events","type":"User","site_admin":false},"repo":{"id":34455078,"name":"python-pagseguro","full_name":"arthurbarros/python-pagseguro","owner":{"login":"arthurbarros","id":1091270,"avatar_url":"https://avatars.githubusercontent.com/u/1091270?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurbarros","html_url":"https://github.com/arthurbarros","followers_url":"https://api.github.com/users/arthurbarros/followers","following_url":"https://api.github.com/users/arthurbarros/following{/other_user}","gists_url":"https://api.github.com/users/arthurbarros/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurbarros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurbarros/subscriptions","organizations_url":"https://api.github.com/users/arthurbarros/orgs","repos_url":"https://api.github.com/users/arthurbarros/repos","events_url":"https://api.github.com/users/arthurbarros/events{/privacy}","received_events_url":"https://api.github.com/users/arthurbarros/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arthurbarros/python-pagseguro","description":"Integração com a API v2 de pagamentos e notificações do Pagseguro utilizando requests.","fork":true,"url":"https://api.github.com/repos/arthurbarros/python-pagseguro","forks_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/forks","keys_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/teams","hooks_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/hooks","issue_events_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/issues/events{/number}","events_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/events","assignees_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/assignees{/user}","branches_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/branches{/branch}","tags_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/tags","blobs_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/git/refs{/sha}","trees_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/statuses/{sha}","languages_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/languages","stargazers_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/stargazers","contributors_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/contributors","subscribers_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/subscribers","subscription_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/subscription","commits_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/commits{/sha}","git_commits_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/git/commits{/sha}","comments_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/comments{/number}","issue_comment_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/issues/comments{/number}","contents_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/contents/{+path}","compare_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/merges","archive_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/downloads","issues_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/issues{/number}","pulls_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/pulls{/number}","milestones_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/milestones{/number}","notifications_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/labels{/name}","releases_url":"https://api.github.com/repos/arthurbarros/python-pagseguro/releases{/id}","created_at":"2015-04-23T12:32:24Z","updated_at":"2015-04-23T14:35:15Z","pushed_at":"2015-04-23T17:45:28Z","git_url":"git://github.com/arthurbarros/python-pagseguro.git","ssh_url":"git@github.com:arthurbarros/python-pagseguro.git","clone_url":"https://github.com/arthurbarros/python-pagseguro.git","svn_url":"https://github.com/arthurbarros/python-pagseguro","homepage":null,"size":285,"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":"rochacbruno:master","ref":"master","sha":"ab2a37a5f39bb7cb91062ff2f1c2ef6f1b180237","user":{"login":"rochacbruno","id":458654,"avatar_url":"https://avatars.githubusercontent.com/u/458654?v=3","gravatar_id":"","url":"https://api.github.com/users/rochacbruno","html_url":"https://github.com/rochacbruno","followers_url":"https://api.github.com/users/rochacbruno/followers","following_url":"https://api.github.com/users/rochacbruno/following{/other_user}","gists_url":"https://api.github.com/users/rochacbruno/gists{/gist_id}","starred_url":"https://api.github.com/users/rochacbruno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochacbruno/subscriptions","organizations_url":"https://api.github.com/users/rochacbruno/orgs","repos_url":"https://api.github.com/users/rochacbruno/repos","events_url":"https://api.github.com/users/rochacbruno/events{/privacy}","received_events_url":"https://api.github.com/users/rochacbruno/received_events","type":"User","site_admin":false},"repo":{"id":13962818,"name":"python-pagseguro","full_name":"rochacbruno/python-pagseguro","owner":{"login":"rochacbruno","id":458654,"avatar_url":"https://avatars.githubusercontent.com/u/458654?v=3","gravatar_id":"","url":"https://api.github.com/users/rochacbruno","html_url":"https://github.com/rochacbruno","followers_url":"https://api.github.com/users/rochacbruno/followers","following_url":"https://api.github.com/users/rochacbruno/following{/other_user}","gists_url":"https://api.github.com/users/rochacbruno/gists{/gist_id}","starred_url":"https://api.github.com/users/rochacbruno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochacbruno/subscriptions","organizations_url":"https://api.github.com/users/rochacbruno/orgs","repos_url":"https://api.github.com/users/rochacbruno/repos","events_url":"https://api.github.com/users/rochacbruno/events{/privacy}","received_events_url":"https://api.github.com/users/rochacbruno/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rochacbruno/python-pagseguro","description":"Integração com a API v2 de pagamentos e notificações do Pagseguro utilizando requests.","fork":false,"url":"https://api.github.com/repos/rochacbruno/python-pagseguro","forks_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/forks","keys_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/teams","hooks_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/hooks","issue_events_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/issues/events{/number}","events_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/events","assignees_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/assignees{/user}","branches_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/branches{/branch}","tags_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/tags","blobs_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/git/refs{/sha}","trees_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/statuses/{sha}","languages_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/languages","stargazers_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/stargazers","contributors_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/contributors","subscribers_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/subscribers","subscription_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/subscription","commits_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/commits{/sha}","git_commits_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/git/commits{/sha}","comments_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/comments{/number}","issue_comment_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/issues/comments{/number}","contents_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/contents/{+path}","compare_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/merges","archive_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/downloads","issues_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/issues{/number}","pulls_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls{/number}","milestones_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/milestones{/number}","notifications_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/labels{/name}","releases_url":"https://api.github.com/repos/rochacbruno/python-pagseguro/releases{/id}","created_at":"2013-10-29T17:15:47Z","updated_at":"2015-04-23T15:46:06Z","pushed_at":"2015-04-23T17:52:56Z","git_url":"git://github.com/rochacbruno/python-pagseguro.git","ssh_url":"git@github.com:rochacbruno/python-pagseguro.git","clone_url":"https://github.com/rochacbruno/python-pagseguro.git","svn_url":"https://github.com/rochacbruno/python-pagseguro","homepage":null,"size":546,"stargazers_count":50,"watchers_count":50,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":11,"forks":30,"open_issues":11,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls/26"},"html":{"href":"https://github.com/rochacbruno/python-pagseguro/pull/26"},"issue":{"href":"https://api.github.com/repos/rochacbruno/python-pagseguro/issues/26"},"comments":{"href":"https://api.github.com/repos/rochacbruno/python-pagseguro/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rochacbruno/python-pagseguro/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/rochacbruno/python-pagseguro/statuses/d8cdace179dcd1b18a5d3c3a5f2c140e71b034e7"}}}}